Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the
hostid of the machine rather than always getting "0". PR: kern/91293 Submitted by: "Pedro f. Giffuni" <giffunip asme org> Obtained from: NetBSD
This commit is contained in:
parent
818c7c128e
commit
db4bab7fb9
@ -417,9 +417,10 @@ svr4_sys_systeminfo(td, uap)
|
||||
int error = 0;
|
||||
register_t *retval = td->td_retval;
|
||||
size_t len = 0;
|
||||
char buf[1]; /* XXX NetBSD uses 256, but that seems
|
||||
like awfully excessive kstack usage
|
||||
for an empty string... */
|
||||
char buf[11]; /* XXX NetBSD uses 256, but we use 11
|
||||
here as that seems like awfully
|
||||
excessive kstack usage for hostid
|
||||
string... */
|
||||
u_int rlen = uap->len;
|
||||
|
||||
switch (uap->what) {
|
||||
@ -448,7 +449,8 @@ svr4_sys_systeminfo(td, uap)
|
||||
break;
|
||||
|
||||
case SVR4_SI_HW_SERIAL:
|
||||
str = "0";
|
||||
snprintf(buf, sizeof(buf), "%lu", hostid);
|
||||
str = buf;
|
||||
break;
|
||||
|
||||
case SVR4_SI_HW_PROVIDER:
|
||||
|
Loading…
x
Reference in New Issue
Block a user