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
|
.\" 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@gmx.net>
.\" 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 2004-05-27 "Linux 2.6.6" "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 " flag ", void *" arg );
.sp
glibc ǤϡϢ RB_* Ȥܥå̾դƤ롣
饤֥ؿΰ 1 Ĥǡ
3 ΥƥॳΥå (wrapper) ȤʤäƤ롣
.sp
.B #include <unistd.h>
.br
.B #include <sys/reboot.h>
.sp
.BI "int reboot(int " flag );
.SH
.B reboot
ϥƥƵư롣ޤϺƵưΥȥǤ
Ctrl-Alt-Delete (CAD) ͭ/̵ˤ롣
Υȥ
.BR loadkeys (1)
ˤäѹǤ롣
.PP
.I magic
LINUX_REBOOT_MAGIC1 (ͤ 0xfee1dead) Ǥꡢ
.I magic2
LINUX_REBOOT_MAGIC2 (672274793)
ǤʤФΥƥॳϼԤEINVAL ֤롣
2.1.17 LINUX_REBOOT_MAGIC2A (85072278)
ޤ 2.1.97 LINUX_REBOOT_MAGIC2B (369367448)
2.5.71 LINUX_REBOOT_MAGIC2C (537993216)
.I magic2
ͤȤƻǤ褦ˤʤä ( 16 ʤǤ
ɽˤϤäȤ̣)
.I flag
ˤϰʲͤǤ롣
.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 '%s'' Ȥåɽ졢
(
.I arg
˻ꤵ줿ޥɤѤ) Ƶư (restart) Ԥ롣
.BR sync (2)
Ԥʤʤȡǡ롣
.TP
.B LINUX_REBOOT_CMD_CAD_ON
(RB_ENABLE_CAD, 0x89abcdef)
CAD ͭˤ롣
ʹߤ CAD ȥϤȡ
LINUX_REBOOT_CMD_RESTART
˴Ϣդ줿ưԤ褦ˤʤ롣
.TP
.B LINUX_REBOOT_CMD_CAD_OFF
(RB_DISABLE_CAD, 0)
CAD ̵ˤ롣
ʹߤ CAD ȥϤȡ
SIGINT ʥ뤬 init (ץ 1) 롣
Υʥȡ餯 init ץ
ä줿ưԤȤˤʤ (¿ʬ٤ƤΥץ kill,
sync, Ƶư)
.LP
δؿȤΤϥѡ桼Ǥ롣
.LP
ҤΥμºݤθ̤ϥƥ˰¸롣
i386 ƥǤϡߤΤȤ (2.1.122) ղð
ԤʤƵưΥפͥΥޥɥ饤
(`reboot=...') ˤä뤳ȤǤ롣
ˤ warm ޤ cold ȡ hard ޤ BIOS ͳκƵư
Ǥ롣
.SH ֤
0֤롣顼ʤ\-1֤ꡢ
.I errno
顼ƤˤäƥåȤ롣
.SH 顼
.TP
.B EFAULT
LINUX_REBOOT_CMD_RESTART2 λ˥桼ڡΥǡμ
꤬ä
.TP
.B EINVAL
magic ο \fIflag\fP ְäƤ롣
.TP
.B EPERM
root Ǥʤ桼
.B reboot
ƤӽФȤ
ƤӽФץ
.BR reboot
ƤӽФΤ˽ʬʸ¤ʤä
.B CAP_SYS_BOOT
ѥӥƥɬפǤ롣
.SH
.B reboot
Linux ͭǤꡢܿθץǤѤ٤ǤϤʤ
.SH Ϣ
.BR sync (2),
.BR bootparam (7),
.BR ctrlaltdel (8),
.BR halt (8),
.BR reboot (8),
.BR capabilities (7)
|