use super::exec::execute_sudo_command;
use super::super::error::BtrfsError;
use crate::process::CommandResult;

pub fn execute(device: &str, args: &[&str]) -> Result<CommandResult, BtrfsError> {
    let mut cmd_args = args.to_vec();
    cmd_args.insert(0, device);
    execute_sudo_command("hdparm", &cmd_args)
}

