From 0305ab3eec2641fcdf962278a99e94f10457e0b6 Mon Sep 17 00:00:00 2001 From: Chris Torek Date: Mon, 5 Apr 1993 22:33:41 -0800 Subject: [PATCH] {set,get}hostname and gethostid are needed for COMPAT_SUNOS too. (note that sethostid is not---SunOS has no way to alter the host ID) SCCS-vsn: sys/kern/kern_xxx.c 7.23 --- usr/src/sys/kern/kern_xxx.c | 62 +++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/usr/src/sys/kern/kern_xxx.c b/usr/src/sys/kern/kern_xxx.c index 8af5b7a45a..0517803aa3 100644 --- a/usr/src/sys/kern/kern_xxx.c +++ b/usr/src/sys/kern/kern_xxx.c @@ -31,36 +31,7 @@ reboot(p, uap, retval) return (0); } -#ifdef COMPAT_43 - -extern long hostid; - -struct gethostid_args { - int dummy; -}; -/* ARGSUSED */ -ogethostid(p, uap, retval) - struct proc *p; - struct gethostid_args *uap; - int *retval; -{ - - *(long *)retval = hostid; - return (0); -} - -struct sethostid_args { - long hostid; -}; -/* ARGSUSED */ -osethostid(p, uap, retval) - struct proc *p; - struct sethostid_args *uap; - int *retval; -{ - int error; - -} +#if defined(COMPAT_43) || defined(COMPAT_SUNOS) struct gethostname_args { char *hostname; @@ -94,6 +65,37 @@ osethostname(p, uap, retval) return (kern_sysctl(&name, 1, 0, 0, uap->hostname, uap->len)); } +extern long hostid; + +struct gethostid_args { + int dummy; +}; +/* ARGSUSED */ +ogethostid(p, uap, retval) + struct proc *p; + struct gethostid_args *uap; + int *retval; +{ + + *(long *)retval = hostid; + return (0); +} +#endif /* COMPAT_43 || COMPAT_SUNOS */ + +#ifdef COMPAT_43 +struct sethostid_args { + long hostid; +}; +/* ARGSUSED */ +osethostid(p, uap, retval) + struct proc *p; + struct sethostid_args *uap; + int *retval; +{ + int error; + +} + oquota() { -- 2.20.1