Skip to content

Commit

Permalink
Name enum variants after the libc constants
Browse files Browse the repository at this point in the history
  • Loading branch information
bugaevc committed Jul 14, 2016
1 parent 8f6b162 commit 215f387
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sys/reboot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use std::mem::drop;
#[repr(i32)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum RebootMode {
Halt = libc::RB_HALT_SYSTEM,
kexec = libc::RB_KEXEC,
PowerOff = libc::RB_POWER_OFF,
Restart = libc::RB_AUTOBOOT,
RB_HALT_SYSTEM = libc::RB_HALT_SYSTEM,
RB_KEXEC = libc::RB_KEXEC,
RB_POWER_OFF = libc::RB_POWER_OFF,
RB_AUTOBOOT = libc::RB_AUTOBOOT,
// we do not support Restart2,
Suspend = libc::RB_SW_SUSPEND,
RB_SW_SUSPEND = libc::RB_SW_SUSPEND,
}

pub fn reboot(how: RebootMode) -> Result<Void> {
Expand Down

0 comments on commit 215f387

Please sign in to comment.