Commit | Line | Data |
---|---|---|
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 | |
21 | reboot \- 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 | 31 | reboots the system, and is invoked automatically |
7b826f9e KM |
32 | in the event of unrecoverable system failures. |
33 | .I Howto | |
34 | is a mask of options passed to the bootstrap program. | |
35 | The system call interface permits only RB_HALT or RB_AUTOBOOT | |
36 | to be passed to the reboot program; the other flags | |
37 | are used in scripts stored on the console storage media, or used | |
38 | in manual bootstrap procedures. | |
39 | When none of these options (e.g. RB_AUTOBOOT) is given, the system is rebooted | |
40 | from file \*(lqvmunix\*(rq in the root file system of unit 0 | |
72252431 | 41 | of a disk chosen in a processor specific way. |
7b826f9e KM |
42 | An automatic consistency check of the disks is then normally performed. |
43 | .PP | |
44 | The bits of | |
45 | .I howto | |
46 | are: | |
47 | .TP | |
48 | RB_HALT | |
49 | the processor is simply halted; no reboot takes place. | |
72252431 | 50 | RB_HALT should be used with caution. |
7b826f9e KM |
51 | .TP |
52 | RB_ASKNAME | |
53 | Interpreted by the bootstrap program itself, causing it to | |
54 | inquire as to what file should be booted. Normally, the system is | |
72252431 | 55 | booted from the file \*(lqxx(0,0)vmunix\*(rq without asking. |
7b826f9e KM |
56 | .TP |
57 | RB_SINGLE | |
58 | Normally, the reboot procedure involves an automatic disk consistency | |
72252431 | 59 | check and then multi-user operations. RB_SINGLE prevents the consistency |
7b826f9e | 60 | check, rather simply booting the system with a single-user shell on |
72252431 KM |
61 | the console. |
62 | RB_SINGLE is interpreted by the | |
7b826f9e KM |
63 | .IR init (8) |
64 | program in the newly booted system. | |
65 | This switch is not available from the system call interface. | |
72252431 KM |
66 | .PP |
67 | Only the super-user may | |
68 | .I reboot | |
69 | a machine. | |
70 | .SH "RETURN VALUES" | |
71 | If successful, this call never returns. Otherwise, a \-1 | |
72 | is returned and an error is returned in the global variable | |
73 | .IR errno . | |
74 | .SH ERRORS | |
75 | .TP 15 | |
76 | [EPERM] | |
77 | The caller is not the super-user. | |
7b826f9e KM |
78 | .SH "SEE ALSO" |
79 | crash(8), halt(8), init(8), reboot(8) | |
80 | .SH BUGS | |
72252431 KM |
81 | The notion of ``console medium'', among other things, |
82 | is specific to the VAX. |