INNER CODE UNIT · Rust

teardown_scsi_debug_device

openebs/mayastor · io-engine-tests/src/lib.rs:272

pub fn teardown_scsi_debug_device() {
    let mut output = None;
    for _ in 0..20 {
        let attempt = Command::new("sudo")
            .args(["modprobe", "-r", "scsi_debug"])
            .output()
            .expect("failed exec modprobe -r scsi_debug");
        if attempt.status.success() {
            return;
        }
        output = Some(attempt);
        std::thread::sleep(Duration::from_millis(100));
    }
    panic!("failed to unload scsi_debug: {:#?}", output.unwrap());
}

pub fn fscheck(device: &str) {
    let output = Command::new("fsck")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…