{set,get}hostname and gethostid are needed for COMPAT_SUNOS too.
authorChris Torek <torek@ucbvax.Berkeley.EDU>
Tue, 6 Apr 1993 06:33:41 +0000 (22:33 -0800)
committerChris Torek <torek@ucbvax.Berkeley.EDU>
Tue, 6 Apr 1993 06:33:41 +0000 (22:33 -0800)
(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

index 8af5b7a..0517803 100644 (file)
@@ -31,36 +31,7 @@ reboot(p, uap, retval)
        return (0);
 }
 
        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;
 
 struct gethostname_args {
        char    *hostname;
@@ -94,6 +65,37 @@ osethostname(p, uap, retval)
        return (kern_sysctl(&name, 1, 0, 0, uap->hostname, uap->len));
 }
 
        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()
 {
 
 oquota()
 {