system call is unmount not umount
[unix-history] / usr / src / lib / libc / sys / reboot.2
CommitLineData
88b3ccf2
KB
1.\" Copyright (c) 1980 The Regents of the University of California.
2.\" All rights reserved.
7b826f9e 3.\"
88b3ccf2
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)reboot.2 6.2 (Berkeley) %G%
7b826f9e 17.\"
ab9465ad 18.TH REBOOT 2 ""
7b826f9e
KM
19.UC 4
20.SH NAME
21reboot \- reboot system or halt processor
22.SH SYNOPSIS
23.nf
24.B #include <sys/reboot.h>
25.PP
26.B reboot(howto)
27.B int howto;
28.fi
29.SH DESCRIPTION
30.I Reboot
72252431 31reboots the system, and is invoked automatically
7b826f9e
KM
32in the event of unrecoverable system failures.
33.I Howto
34is a mask of options passed to the bootstrap program.
35The system call interface permits only RB_HALT or RB_AUTOBOOT
36to be passed to the reboot program; the other flags
37are used in scripts stored on the console storage media, or used
38in manual bootstrap procedures.
39When none of these options (e.g. RB_AUTOBOOT) is given, the system is rebooted
40from file \*(lqvmunix\*(rq in the root file system of unit 0
72252431 41of a disk chosen in a processor specific way.
7b826f9e
KM
42An automatic consistency check of the disks is then normally performed.
43.PP
44The bits of
45.I howto
46are:
47.TP
48RB_HALT
49the processor is simply halted; no reboot takes place.
72252431 50RB_HALT should be used with caution.
7b826f9e
KM
51.TP
52RB_ASKNAME
53Interpreted by the bootstrap program itself, causing it to
54inquire as to what file should be booted. Normally, the system is
72252431 55booted from the file \*(lqxx(0,0)vmunix\*(rq without asking.
7b826f9e
KM
56.TP
57RB_SINGLE
58Normally, the reboot procedure involves an automatic disk consistency
72252431 59check and then multi-user operations. RB_SINGLE prevents the consistency
7b826f9e 60check, rather simply booting the system with a single-user shell on
72252431
KM
61the console.
62RB_SINGLE is interpreted by the
7b826f9e
KM
63.IR init (8)
64program in the newly booted system.
65This switch is not available from the system call interface.
72252431
KM
66.PP
67Only the super-user may
68.I reboot
69a machine.
70.SH "RETURN VALUES"
71If successful, this call never returns. Otherwise, a \-1
72is returned and an error is returned in the global variable
73.IR errno .
74.SH ERRORS
75.TP 15
76[EPERM]
77The caller is not the super-user.
7b826f9e
KM
78.SH "SEE ALSO"
79crash(8), halt(8), init(8), reboot(8)
80.SH BUGS
72252431
KM
81The notion of ``console medium'', among other things,
82is specific to the VAX.