hdexecutor 0.1.10

execute a HYDRAulic damnation represention of a program with a filesystem image
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use hdrepresentation::Program;
use hdexecutor::exec;
use std::env;
use std::io::{Error, ErrorKind};

fn main() -> Result<(), std::io::Error> {
    let args: Vec<String> = env::args().collect();
    if args.len() != 4 {
        eprintln!(
            "Usage: {} [deserialized program] [filesystem image] [filesystem type(i.e. ext4, btrfs)]",
            &args[0]
        );
        return Err(Error::new(ErrorKind::Other, "invalid arguments"));
    }
    let f = Program::from_path(&args[1]);
    exec(&f, args[2].clone(), args[3].clone())?;
    Ok(())
}