Skip to content

Commit c13b2d1

Browse files
committed
snapshot: remove snapshot versions with --version option
Previously, using the '--version' flag of the Firecracker binary would print the Firecracker version and the supported snapshot versions. Change the behaviour to only print the Firecracker version. Signed-off-by: Babis Chalios <[email protected]>
1 parent 11057cd commit c13b2d1

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/firecracker/src/main.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ fn main_exec() -> Result<(), MainError> {
256256

257257
if arguments.flag_present("version") {
258258
println!("Firecracker v{}\n", FIRECRACKER_VERSION);
259-
print_supported_snapshot_versions();
260259
return Ok(());
261260
}
262261

@@ -509,20 +508,6 @@ pub fn enable_ssbd_mitigation() {
509508
#[allow(unused)]
510509
fn warn_deprecated_parameters() {}
511510

512-
// Print supported snapshot data format versions.
513-
fn print_supported_snapshot_versions() {
514-
let mut versions: Vec<_> = FC_VERSION_TO_SNAP_VERSION
515-
.iter()
516-
.map(|(key, _)| key.clone())
517-
.collect();
518-
versions.sort();
519-
520-
println!("Supported snapshot data format versions:");
521-
for v in versions.iter() {
522-
println!("{v}");
523-
}
524-
}
525-
526511
#[derive(Debug, thiserror::Error, displaydoc::Display)]
527512
enum SnapshotVersionError {
528513
/// Unable to open snapshot state file: {0}

0 commit comments

Comments
 (0)