delete hardware speed, add machine byte order
[unix-history] / usr / src / sys / kern / kern_xxx.c
CommitLineData
da7c5cc6 1/*
ffa9c2af
KM
2 * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
3 * All rights reserved.
da7c5cc6 4 *
dbf0c423 5 * %sccs.include.redist.c%
ffa9c2af 6 *
e7d26b7c 7 * @(#)kern_xxx.c 7.24 (Berkeley) %G%
da7c5cc6 8 */
3dbbffbd 9
38a01dbe
KB
10#include <sys/param.h>
11#include <sys/systm.h>
12#include <sys/kernel.h>
13#include <sys/proc.h>
14#include <sys/reboot.h>
e7d26b7c 15#include <vm/vm.h>
02549ed8 16#include <sys/sysctl.h>
3dbbffbd 17
02549ed8
KM
18struct reboot_args {
19 int opt;
20};
21/* ARGSUSED */
22reboot(p, uap, retval)
23 struct proc *p;
24 struct reboot_args *uap;
25 int *retval;
26{
27 int error;
28
29 if (error = suser(p->p_ucred, &p->p_acflag))
30 return (error);
31 boot(uap->opt);
32 return (0);
33}
34
0305ab3e 35#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
3dbbffbd 36
9e97623a
CT
37struct gethostname_args {
38 char *hostname;
39 u_int len;
40};
fc4a5eac 41/* ARGSUSED */
265542db 42ogethostname(p, uap, retval)
fc4a5eac 43 struct proc *p;
9e97623a 44 struct gethostname_args *uap;
fc4a5eac
MK
45 int *retval;
46{
02549ed8 47 int name;
3dbbffbd 48
02549ed8
KM
49 name = KERN_HOSTNAME;
50 return (kern_sysctl(&name, 1, uap->hostname, &uap->len, 0, 0));
3dbbffbd
SL
51}
52
9e97623a
CT
53struct sethostname_args {
54 char *hostname;
55 u_int len;
56};
fc4a5eac 57/* ARGSUSED */
265542db 58osethostname(p, uap, retval)
fc4a5eac 59 struct proc *p;
9e97623a 60 register struct sethostname_args *uap;
fc4a5eac
MK
61 int *retval;
62{
02549ed8 63 int name;
3dbbffbd 64
02549ed8
KM
65 name = KERN_HOSTNAME;
66 return (kern_sysctl(&name, 1, 0, 0, uap->hostname, uap->len));
3dbbffbd
SL
67}
68
0305ab3e
CT
69extern long hostid;
70
71struct gethostid_args {
72 int dummy;
73};
74/* ARGSUSED */
75ogethostid(p, uap, retval)
76 struct proc *p;
77 struct gethostid_args *uap;
78 int *retval;
79{
80
81 *(long *)retval = hostid;
82 return (0);
83}
84#endif /* COMPAT_43 || COMPAT_SUNOS */
85
86#ifdef COMPAT_43
87struct sethostid_args {
88 long hostid;
89};
90/* ARGSUSED */
91osethostid(p, uap, retval)
92 struct proc *p;
93 struct sethostid_args *uap;
94 int *retval;
95{
96 int error;
97
98}
99
16688d3b 100oquota()
a2d8720f 101{
d86b717b 102
16688d3b 103 return (ENOSYS);
004e44d8 104}
02549ed8 105#endif /* COMPAT_43 */