This commit is contained in:
Cutieguwu
2026-01-02 02:01:24 -05:00
parent d4094d61f0
commit 754ab48b92

View File

@@ -31,14 +31,16 @@ pub struct Args {
#[arg(short, long, default_value_t = crate::FB_SECTOR_SIZE)] #[arg(short, long, default_value_t = crate::FB_SECTOR_SIZE)]
pub sector_size: usize, pub sector_size: usize,
// Behaviour is backwards. // !!! ArgAction behaviour is backwards !!!
// ArgAction::SetFalse by default evaluates to true, // ArgAction::SetFalse by default evaluates to true,
// ArgAction::SetTrue by default evaluates to false. // ArgAction::SetTrue by default evaluates to false.
//
/// Upon encountering a read error, reopen the source file before continuing. /// Upon encountering a read error, reopen the source file before continuing.
#[arg(short, long, action = ArgAction::SetTrue)] #[arg(short, long, action = ArgAction::SetTrue)]
pub reopen_on_error: bool, pub reopen_on_error: bool,
/// Use O_DIRECT to bypass kernel buffer when reading. /// Use O_DIRECT to bypass kernel buffer when reading.
//
// BSD seems to support O_DIRECT, but MacOS for certain does not. // BSD seems to support O_DIRECT, but MacOS for certain does not.
#[cfg(all(unix, not(target_os = "macos")))] #[cfg(all(unix, not(target_os = "macos")))]
#[arg(short, long = "direct", action = ArgAction::SetFalse)] #[arg(short, long = "direct", action = ArgAction::SetFalse)]