File: reboot.2

package info (click to toggle)
manpages-ja 0.5.0.0.20100315-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,156 kB
  • ctags: 1
  • sloc: sh: 13,935; perl: 157; makefile: 114
file content (191 lines) | stat: -rw-r--r-- 5,644 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
.\" Copyright (c) 1998 Andries Brouwer (aeb@cwi.nl), 24 September 1998
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\"     Added notes on capability requirements
.\"
.\" Japanese Version Copyright (c) 1997 Ueyama Rui
.\"         all rights reserved.
.\" Translated Mon Sep 29 23:21:04 JST 1997
.\"         by Ueyama Rui <rui@campus.ne.jp>
.\" Updated & Modified Mon Mar 1 1999
.\"         by NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\" Updated Sat Oct 11 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
.\"
.\"WORD		halt		
.\"WORD		stop		
.\"WORD		reboot		Ƶư
.\"
.TH REBOOT 2 2008-02-11 "Linux" "Linux Programmer's Manual"
.SH ̾
reboot \- Ƶư롣ޤ Ctrl-Alt-Del̵ͭˤ
.SH 
/* libc4  libc5 ǤΥ饤֥ꥳȥƥॳƱǤ롣
   ޤͥ 2.1.30 ʹߤǤϡȤƥܥå̾
   LINUX_REBOOT_* ƤꡢƤӽФ 4 Ȥ
   ꤹ뤳ȤǤ롣*/
.sp
.B #include <unistd.h>
.br
.B #include <linux/reboot.h>
.sp
.BI "int reboot(int " magic ", int " magic2 ", int " cmd ", void *" arg );
.sp
/* glibc ǤϡϢ RB_* Ȥܥå̾դ
   Ƥ롣饤֥ؿΰ 1 Ĥǡ3 Υƥॳ
   å (wrapper) ȤʤäƤ롣 */
.sp
.B #include <unistd.h>
.br
.B #include <sys/reboot.h>
.sp
.BI "int reboot(int " cmd );
.SH 
.BR reboot ()
ϥƥƵư롣ޤϺƵưΥȥǤ
Ctrl-Alt-Delete (CAD) ͭ/̵ˤ롣
Υȥ
.BR loadkeys (1)
ˤäѹǤ롣
.PP
.I magic

.B LINUX_REBOOT_MAGIC1
(ͤ 0xfee1dead) Ǥꡢ
.I magic2

.B LINUX_REBOOT_MAGIC2
(672274793) ǤʤФΥƥॳϼԤ
.B EINVAL
֤롣
 2.1.17 
.B LINUX_REBOOT_MAGIC2A
(85072278) 
ޤ 2.1.97 
.B LINUX_REBOOT_MAGIC2B
(369367448) 
2.5.71 
.B LINUX_REBOOT_MAGIC2C
(537993216) 
.I magic2
ͤȤƻǤ褦ˤʤä ( 16 ʤǤ
ɽˤϤäȤ̣)
.I cmd
ˤϰʲͤǤ롣
.TP
.B LINUX_REBOOT_CMD_RESTART
(RB_AUTOBOOT, 0x1234567)
"Restarting system." Ȥåɽ졢
ǥեȤκƵư˼¹Ԥ롣

.BR sync (2)
Ԥʤʤȡǡ롣
.TP
.B LINUX_REBOOT_CMD_HALT
(RB_HALT_SYSTEM, 0xcdef0123; 1.1.76 ʹ)
"System halted." Ȥåɽ졢ƥ (halt) 롣
 ROM ˥˰ܤ (ROM ˥)

.BR sync (2)
Ԥʤʤȡǡ롣
.TP
.B LINUX_REBOOT_CMD_POWER_OFF
(0x4321fedc; 2.1.30 ʹ)
"Power down" Ȥåɽ졢ƥ (stop) 롣
ǽʾϥƥŸȤ롣

.BR sync (2)
Ԥʤʤȡǡ롣
.TP
.B LINUX_REBOOT_CMD_RESTART2
(0xa1b2c3d4; 2.1.30 ʹ)
"Restarting system with command \(aq%s\(aq" Ȥåɽ졢
 (
.I arg
˻ꤵ줿ޥɤѤ) Ƶư (restart) Ԥ롣

.BR sync (2)
Ԥʤʤȡǡ롣
.TP
.B LINUX_REBOOT_CMD_CAD_ON
(RB_ENABLE_CAD, 0x89abcdef)
CAD ͭˤ롣
ʹߤ CAD ȥϤȡ

.B LINUX_REBOOT_CMD_RESTART
˴Ϣդ줿ưԤ褦ˤʤ롣
.TP
.B LINUX_REBOOT_CMD_CAD_OFF
(RB_DISABLE_CAD, 0)
CAD ̵ˤ롣
ʹߤ CAD ȥϤȡ
.B SIGINT
ʥ뤬 init (ץ 1) 롣
Υʥȡ餯 init ץ
ä줿ưԤȤˤʤ (¿ʬ٤ƤΥץ kill,
sync, Ƶư)
.LP
ѡ桼
.BR reboot ()
ƤӽФȤǤ롣
.LP
ҤΥμºݤθ̤ϥƥ˰¸롣
i386 ƥǤϡߤΤȤ (2.1.122) ղð
ԤʤƵưΥפ򥫡ͥΥޥɥ饤
("reboot=...") ˤä뤳ȤǤ롣
ˤ warm ޤ cold ȡ hard ޤ BIOS ͳκƵư
Ǥ롣
.SH ֤
.I cmd
ƥߤƵưɽͤξ硢ƤӽФ
.BR reboot ()
֤ʤ
.I cmd
¾ͤξˤϡ 0 ֤롣
.I cmd
ͤ˴ؤ餺Ԥξˤ \-1 ֤ꡢ
.I errno
Ŭڤꤵ롣
.SH 顼
.TP
.B EFAULT
.B LINUX_REBOOT_CMD_RESTART2
λ˥桼ڡΥǡμ꤬ä
.TP
.B EINVAL
magic ο \fIcmd\fP ְäƤ롣
.TP
.B EPERM
ƤӽФץ
.BR reboot ()
ƤӽФΤ˽ʬʸ¤ʤä
.B CAP_SYS_BOOT
ѥӥƥɬפǤ롣
.SH 
.BR reboot ()
 Linux ͭǤꡢܿθץǤѤ٤ǤϤʤ
.SH Ϣ
.BR sync (2),
.BR bootparam (7),
.BR ctrlaltdel (8),
.BR halt (8),
.BR reboot (8),
.BR capabilities (7)