1 unstable release
Uses old Rust 2015
0.1.0 | May 8, 2016 |
---|
#954 in Hardware support
6KB
108 lines
hdd_standby
Libray to check the power state of a hdd using ioctls. Currently only supported on unix.
Example
extern crate hdd_standby;
fn main() {
let status = hdd_standby::get_power_state("/dev/sda");
println!("{:?}", status.unwrap_or(PowerState::Unknown));
}
Licence
This library is licenced under the terms of the MIT licence.
lib.rs
:
Libray to check the power state of a hdd
This library allows querying the power status of an ata device using the ioctl syscall and is therefore currently only supported on unix systems. Querying a spun down drive will not cause a spinup.
The necessary ATA constants were taken from the ACS-3 draft standard.
Dependencies
~43KB