diff options
| author | Steven Wallace <swallace@FreeBSD.org> | 1995-10-16 05:32:20 +0000 |
|---|---|---|
| committer | Steven Wallace <swallace@FreeBSD.org> | 1995-10-16 05:32:20 +0000 |
| commit | 30f4c3423dcf7737be0b11d34cee9810437305ad (patch) | |
| tree | cfb9d0c0a3048055a2a974c65e38ad41ff858084 /sys | |
| parent | 287911bd502c3637bd3b7eaec5dd74cc15e7f2b8 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/i386/ibcs2/ibcs2_stat.c | 19 | ||||
| -rw-r--r-- | sys/i386/ibcs2/ibcs2_utsname.h | 12 |
2 files changed, 25 insertions, 6 deletions
diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c index 529d18512343..f01280cf2a1c 100644 --- a/sys/i386/ibcs2/ibcs2_stat.c +++ b/sys/i386/ibcs2/ibcs2_stat.c @@ -232,15 +232,22 @@ ibcs2_utssys(p, uap, retval) case 0: /* uname(2) */ { struct ibcs2_utsname sut; - bzero(&sut, ibcs2_utsname_len); - bcopy(ostype, sut.sysname, sizeof(sut.sysname) - 1); - bcopy(hostname, sut.nodename, sizeof(sut.nodename)); + + strncpy(sut.sysname, IBCS2_UNAME_SYSNAME, sizeof(sut.sysname)); + strncpy(sut.release, IBCS2_UNAME_RELEASE, sizeof(sut.release)); + strncpy(sut.version, IBCS2_UNAME_VERSION, sizeof(sut.version)); + strncpy(sut.nodename, hostname, sizeof(sut.nodename)); + strncpy(sut.machine, machine, sizeof(sut.machine)); + sut.sysname[sizeof(sut.sysname)-1] = '\0'; + sut.release[sizeof(sut.release)-1] = '\0'; + sut.version[sizeof(sut.version)-1] = '\0'; sut.nodename[sizeof(sut.nodename)-1] = '\0'; - bcopy(osrelease, sut.release, sizeof(sut.release) - 1); - bcopy("1", sut.version, sizeof(sut.version) - 1); - bcopy(machine, sut.machine, sizeof(sut.machine) - 1); + sut.machine[sizeof(sut.machine)-1] = '\0'; + DPRINTF(("IBCS2 uname: sys=%s rel=%s ver=%s node=%s mach=%s\n", + sut.sysname, sut.release, sut.version, sut.nodename, + sut.machine)); return copyout((caddr_t)&sut, (caddr_t)SCARG(uap, a1), ibcs2_utsname_len); } diff --git a/sys/i386/ibcs2/ibcs2_utsname.h b/sys/i386/ibcs2/ibcs2_utsname.h index 4f2ee68f7a9b..967cc9b9f5d3 100644 --- a/sys/i386/ibcs2/ibcs2_utsname.h +++ b/sys/i386/ibcs2/ibcs2_utsname.h @@ -33,6 +33,18 @@ #ifndef _IBCS2_UTSNAME_H #define _IBCS2_UTSNAME_H +#ifndef IBCS2_UNAME_SYSNAME +#define IBCS2_UNAME_SYSNAME ostype +#endif + +#ifndef IBCS2_UNAME_RELEASE +#define IBCS2_UNAME_RELEASE "3.2" +#endif + +#ifndef IBCS2_UNAME_VERSION +#define IBCS2_UNAME_VERSION "2.0" +#endif + struct ibcs2_utsname { char sysname[9]; char nodename[9]; |
