⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscalls_97.html

📁 Linux系统调用
💻 HTML
字号:
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - reboot</TITLE>
<P>Go to the <A HREF="syscalls_96.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_96.html">previous</A>, <A HREF="syscalls_98.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_98.html">next</A> section.<P>
<H2><A NAME="SEC97" HREF="syscalls_toc.html#SEC97" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC97">reboot</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int reboot(int <VAR>magic</VAR>, int <VAR>magic_too</VAR>, int <VAR>flag</VAR>);</CODE>
 
<H3>PARAMETERS</H3>
<P>
<VAR>magic</VAR>: [in] <CODE>0xfee1dead</CODE>.
<P>
<VAR>magic_too</VAR>: [in] <CODE>672274793</CODE>.
<P>
<VAR>flag</VAR>: [in] see description.
 
<H3>DESCRIPTION</H3>
<P>
Reboots the machine or enable the Ctrl-Alt-Del combinaison. <VAR>magic</VAR>
must be <CODE>0xfee1dead</CODE> and <VAR>magic_too</VAR> must be <CODE>672274793</CODE>.
If those two conditions are true, then the following values of
<VAR>flag</VAR> perform the specified operations:
<P>
<DL COMPACT>
<DT><CODE>0x1234567</CODE>
<DD>preform a hard reset.
<P>
<DT><CODE>0x89abcdef</CODE>
<DD>Ctrl-Alt-Del is enabled.
<P>
<DT><CODE>0</CODE>
<DD>Ctrl-Atl-Del is disabled and a signal is send to <CODE>init</CODE>.
</DL>
<P>
Does not sync!!! The calling task must have superuser privileges.
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error -1 is returned and <CODE>errno</CODE> is
set to one of the following values:
<P>
<UL>
<LI><CODE>EINVAL</CODE>: the value of <VAR>magic</VAR>, <VAR>magic_too</VAR> or
<VAR>flag</VAR> is invalid.
<LI><CODE>EPERM</CODE>: the calling task does not have superuser privileges.
</UL>
<P>
<P>Go to the <A HREF="syscalls_96.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_96.html">previous</A>, <A HREF="syscalls_98.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_98.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -