Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!attctc!mjbtn!usource!frankb From: frankb@usource.UUCP (Frank Bicknell) Newsgroups: comp.unix.xenix Subject: uname(2) (or, ) Keywords: serial-numbers utsname uname(2) Message-ID: <229@usource.UUCP> Date: 2 Aug 89 01:21:55 GMT Reply-To: frankb@usource.UUCP (Frank Bicknell) Distribution: usa Organization: UniSource, Inc. -- Sarasota, FL Lines: 58 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) 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@usource.UUCP