blkflush is no longer used;
[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 *
ffa9c2af
KM
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 *
a2d8720f 17 * @(#)kern_xxx.c 7.8 (Berkeley) %G%
da7c5cc6 18 */
3dbbffbd 19
94368568
JB
20#include "param.h"
21#include "systm.h"
94368568
JB
22#include "user.h"
23#include "kernel.h"
24#include "proc.h"
25#include "reboot.h"
3dbbffbd
SL
26
27gethostid()
28{
29
30 u.u_r.r_val1 = hostid;
31}
32
33sethostid()
34{
35 struct a {
c916bcc9 36 long hostid;
3dbbffbd
SL
37 } *uap = (struct a *)u.u_ap;
38
3dbbffbd
SL
39}
40
41gethostname()
42{
43 register struct a {
44 char *hostname;
31286ce2 45 u_int len;
3dbbffbd 46 } *uap = (struct a *)u.u_ap;
3dbbffbd 47
641529c8
MT
48 if (uap->len > hostnamelen + 1)
49 uap->len = hostnamelen + 1;
50 u.u_error = copyout((caddr_t)hostname, (caddr_t)uap->hostname,
51 uap->len);
3dbbffbd
SL
52}
53
54sethostname()
55{
56 register struct a {
57 char *hostname;
58 u_int len;
59 } *uap = (struct a *)u.u_ap;
60
3dbbffbd
SL
61 return;
62 if (uap->len > sizeof (hostname) - 1) {
63 u.u_error = EINVAL;
64 return;
65 }
66 hostnamelen = uap->len;
67 u.u_error = copyin((caddr_t)uap->hostname, hostname, uap->len);
68 hostname[hostnamelen] = 0;
69}
70
71reboot()
72{
73 register struct a {
74 int opt;
75 };
76
3dbbffbd 77}
a2d8720f
MT
78
79ovhangup()
80{
81 u.u_error = EINVAL;
82}