Add SI_SYSTEMINFO from Solaris-2.5
This commit is contained in:
parent
a922ebfb8b
commit
02f94c17fb
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_stat.c,v 1.20 1996/04/11 12:46:41 christos Exp $ */
|
||||
/* $NetBSD: svr4_stat.c,v 1.21 1996/04/22 01:16:07 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christos Zoulas
|
||||
@ -433,7 +433,7 @@ svr4_sys_systeminfo(p, v, retval)
|
||||
int error;
|
||||
long len;
|
||||
extern char ostype[], hostname[], osrelease[],
|
||||
version[], machine[], domainname[];
|
||||
version[], machine[], domainname[], cpu_model[];
|
||||
|
||||
u_int rlen = SCARG(uap, len);
|
||||
|
||||
@ -474,6 +474,14 @@ svr4_sys_systeminfo(p, v, retval)
|
||||
str = domainname;
|
||||
break;
|
||||
|
||||
case SVR4_SI_PLATFORM:
|
||||
str = cpu_model;
|
||||
break;
|
||||
|
||||
case SVR4_SI_KERB_REALM:
|
||||
str = "unsupported";
|
||||
break;
|
||||
|
||||
case SVR4_SI_SET_HOSTNAME:
|
||||
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
|
||||
return error;
|
||||
@ -486,6 +494,9 @@ svr4_sys_systeminfo(p, v, retval)
|
||||
name = KERN_DOMAINNAME;
|
||||
return kern_sysctl(&name, 1, 0, 0, SCARG(uap, buf), rlen, p);
|
||||
|
||||
case SVR4_SI_SET_KERB_REALM:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
DPRINTF(("Bad systeminfo command %d\n", SCARG(uap, what)));
|
||||
return ENOSYS;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_systeminfo.h,v 1.2 1994/11/18 02:54:18 christos Exp $ */
|
||||
/* $NetBSD: svr4_systeminfo.h,v 1.3 1996/04/22 01:16:04 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christos Zoulas
|
||||
@ -41,5 +41,8 @@
|
||||
#define SVR4_SI_SRPC_DOMAIN 9
|
||||
#define SVR4_SI_SET_HOSTNAME 258
|
||||
#define SVR4_SI_SET_SRPC_DOMAIN 265
|
||||
#define SVR4_SI_SET_KERB_REALM 266
|
||||
#define SVR4_SI_KERB_REALM 267
|
||||
#define SVR4_SI_PLATFORM 513
|
||||
|
||||
#endif /* !_SVR4_SYSTEMINFO_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user