Module hdd::device [] [src]

Thin wrapper for platform-specific device handle.

This module (and struct it provides) allows opening (Device::open(&path)) and interacting with (via ata::ATADevice/scsi::SCSIDevice traits) devices in a cross-platform manner, as different operating systems provide different device handles to execute commands against (i.e. regular file descriptor on Linux, struct cam_device * on FreeBSD).

Example

use hdd::Device;
use hdd::scsi::SCSIDevice;

let dev = Device::open("/dev/da0").unwrap();
let (sense, data) = dev.scsi_inquiry(vpd, page).unwrap();

Reexports

pub use self::linux::*;

Modules

linux