Cleanup.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use crate::FB_SECTOR_SIZE;
|
||||
|
||||
use clap::{ArgAction, Parser};
|
||||
|
||||
pub static CONFIG: LazyLock<Args> = LazyLock::new(|| Args::parse());
|
||||
@@ -22,7 +20,7 @@ pub struct Args {
|
||||
pub map: Option<PathBuf>,
|
||||
|
||||
/// Max number of consecutive sectors to test as a group
|
||||
#[arg(short, long, default_value_t = 128)]
|
||||
#[arg(short, long, default_value_t = crate::FB_CLUSTER_LEN)]
|
||||
pub cluster_length: usize,
|
||||
|
||||
/// Number of brute force read passes
|
||||
@@ -30,13 +28,13 @@ pub struct Args {
|
||||
pub brute_passes: usize,
|
||||
|
||||
/// Sector size
|
||||
#[arg(short, long, default_value_t = FB_SECTOR_SIZE)]
|
||||
#[arg(short, long, default_value_t = crate::FB_SECTOR_SIZE)]
|
||||
pub sector_size: usize,
|
||||
|
||||
// Behaviour is backwards.
|
||||
// ArgAction::SetFalse by default evaluates to true,
|
||||
// ArgAction::SetTrue by default evaluates to false.
|
||||
/// Whether to reopen the file on a read error or not.
|
||||
/// Upon encountering a read error, reopen the source file before continuing.
|
||||
#[arg(short, long, action=ArgAction::SetTrue)]
|
||||
pub reopen_on_error: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user