uname(2) (or, <sys/utsname.h>)

Frank Bicknell frankb at usource.UUCP
Wed Aug 2 11:21:55 AEST 1989


I have made the aquaintance of one who uses Interactive Unix.
Imagine my surprise (no, not really) when he told me that the
'sysserial' field of the utsname struct is not documented in
their uname(2) system call.

I checked out my own (ancient, 2.2 '286 DS) <sys/utsname.h> and
found the following (some non-essential stuff is deleted):

> struct utsname {
> 	char	sysname[SYS_NMLN];
> 	char	nodename[SYS_NMLN];
> 	char	release[SYS_NMLN];
> 	char	version[SYS_NMLN];
> 	char	machine[SYS_NMLN];
> 	char	reserved[15];
> 	unsigned short	sysorigin;	/* original supplier of Xenix system */
> 	unsigned short	sysoem;		/* OEM for this system */
> 	long		sysserial;	/* serial number for this system */
> };

Ok, I'm used to that one.

> struct uts3name {
> 	char		sysname[SYS_NMLN];
> 	char		nodename[SYS_NMLN];
> 	char		release[SYS_NMLN];
> 	char		version[SYS_NMLN];
> 	unsigned short	sysorigin;	/* original supplier of Xenix system */
> 	unsigned short	sysoem;		/* OEM for this system */
> 	long		sysserial;	/* serial number for this system */
> };

Perhaps an older (newer?) one?

> struct utsV3name {
> 	char	sysname[SYS_NMLN];
> 	char	nodename[SYS_NMLN];
> 	char	release[SYS_NMLN];
> 	char	version[SYS_NMLN];
> 	char	machine[SYS_NMLN];
> };

Uh-oh.  sysserial is missing.  And judging from the 'V3' stuck in
the middle of the struct tag, this is for System V 3.*.  It also
happens to match the breakout of the structure as depicted in
Interactive's documentation under uname(2).  Yet when his
Interactive machine runs a short program calling uname(2)
compiled on my Xenix compiler, it returns 0 in the sysserial
field.  

Now I wonder if Unix 3.2 is dropping the serialized OS.  I also
wonder if other Unix systems will remain serial-number-less.

Does anyone out there know anything about this?
-- 
Frank Bicknell
UniSource; 1405 Main St, Ste 709; Sarasota, FL 34236
attctc!usource!frankb || frankb at usource.UUCP



More information about the Comp.unix.xenix mailing list