Huge refactor. Introduce anyhow for error handling.
This commit is contained in:
32
src/cli.rs
Normal file
32
src/cli.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::FB_SECTOR_SIZE;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct Args {
|
||||
/// Path to source file or block device
|
||||
#[arg(short, long, value_hint = clap::ValueHint::DirPath)]
|
||||
pub input: PathBuf,
|
||||
|
||||
/// Path to output file. Defaults to {input}.iso
|
||||
#[arg(short, long, value_hint = clap::ValueHint::DirPath)]
|
||||
pub output: Option<PathBuf>,
|
||||
|
||||
/// Path to rescue map. Defaults to {input}.map
|
||||
#[arg(short, long, value_hint = clap::ValueHint::DirPath)]
|
||||
pub map: Option<PathBuf>,
|
||||
|
||||
/// Max number of consecutive sectors to test as a group
|
||||
#[arg(short, long, default_value_t = 128)]
|
||||
pub cluster_length: u16,
|
||||
|
||||
/// Number of brute force read passes
|
||||
#[arg(short, long, default_value_t = 2)]
|
||||
pub brute_passes: usize,
|
||||
|
||||
/// Sector size
|
||||
#[arg(short, long, default_value_t = FB_SECTOR_SIZE)]
|
||||
pub sector_size: u16,
|
||||
}
|
||||
Reference in New Issue
Block a user