File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ feature! {
91
91
#[ cfg( target_os = "linux" ) ]
92
92
feature ! {
93
93
#![ feature = "reboot" ]
94
- #[ allow( missing_docs) ]
95
94
pub mod reboot;
96
95
}
97
96
Original file line number Diff line number Diff line change @@ -13,15 +13,22 @@ libc_enum! {
13
13
#[ repr( i32 ) ]
14
14
#[ non_exhaustive]
15
15
pub enum RebootMode {
16
+ /// Halt the system.
16
17
RB_HALT_SYSTEM ,
18
+ /// Execute a kernel that has been loaded earlier with
19
+ /// [`kexec_load(2)`](https://man7.org/linux/man-pages/man2/kexec_load.2.html).
17
20
RB_KEXEC ,
21
+ /// Stop the system and switch off power, if possible.
18
22
RB_POWER_OFF ,
23
+ /// Restart the system.
19
24
RB_AUTOBOOT ,
20
- // we do not support Restart2,
25
+ // we do not support Restart2.
26
+ /// Suspend the system using software suspend.
21
27
RB_SW_SUSPEND ,
22
28
}
23
29
}
24
30
31
+ /// Reboots or shuts down the system.
25
32
pub fn reboot ( how : RebootMode ) -> Result < Infallible > {
26
33
unsafe {
27
34
libc:: reboot ( how as libc:: c_int )
You can’t perform that action at this time.
0 commit comments