Skip to content

Commit 1f48224

Browse files
authored
Restore --gen argument for binaries (#1805)
#1799 renamed `gen` → `generation`, because the former is a reserved word in Rust 2024. That PR special-cased the `generation` field in the volume construction request, because it's serialized to disk; however, we should also special-case CLI arguments to avoid breaking existing scripts.
1 parent 2481b77 commit 1f48224

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

crudd/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub struct Opt {
4040
key: Option<String>,
4141

4242
/// Generation
43-
#[clap(short, long, default_value = "0", action)]
43+
#[clap(short, long = "gen", default_value = "0", action)]
4444
generation: u64,
4545

4646
/// TLS certificate

crutest/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub struct Opt {
174174
#[clap(long, global = true, action)]
175175
flush_timeout: Option<f32>,
176176

177-
#[clap(short, global = true, long, default_value_t = 0, action)]
177+
#[clap(short, global = true, long = "gen", default_value_t = 0, action)]
178178
generation: u64,
179179

180180
/// The key for an encrypted downstairs.

hammer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub struct Opt {
3737
#[clap(short, long, action)]
3838
key: Option<String>,
3939

40-
#[clap(short, long, default_value = "1", action)]
40+
#[clap(short, long = "gen", default_value = "1", action)]
4141
generation: u64,
4242

4343
/*

measure_iops/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct Opt {
2121
#[clap(short, long, action)]
2222
key: Option<String>,
2323

24-
#[clap(short, long, default_value = "0", action)]
24+
#[clap(short, long = "gen", default_value = "0", action)]
2525
generation: u64,
2626

2727
#[clap(long, action)]

nbd_server/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub struct Opt {
3737
#[clap(short, long, action)]
3838
key: Option<String>,
3939

40-
#[clap(short, long, default_value = "0", action)]
40+
#[clap(short, long = "gen", default_value = "0", action)]
4141
generation: u64,
4242

4343
// TLS options

0 commit comments

Comments
 (0)