From 90f2d43a953a3c125f8fde017b3a6d56b011e1e7 Mon Sep 17 00:00:00 2001 From: Ming-Hung Tsai Date: Wed, 29 Jul 2020 18:01:57 +0800 Subject: [PATCH] [thin_generate_damage] Add help text --- thin-provisioning/thin_generate_damage.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/thin-provisioning/thin_generate_damage.cc b/thin-provisioning/thin_generate_damage.cc index 1863d96..9b59793 100644 --- a/thin-provisioning/thin_generate_damage.cc +++ b/thin-provisioning/thin_generate_damage.cc @@ -91,6 +91,15 @@ thin_generate_damage_cmd::thin_generate_damage_cmd() void thin_generate_damage_cmd::usage(std::ostream &out) const { + out << "Usage: " << get_name() << " [options]\n" + << "Options:\n" + << " {-h|--help}\n" + << " {-o|--output} \n" + << " {--create-metadata-leaks}\n" + << " {--nr-blocks} \n" + << " {--expected} \n" + << " {--actual} \n" + << " {-V|--version}" << endl; } int @@ -114,7 +123,7 @@ thin_generate_damage_cmd::run(int argc, char **argv) switch(c) { case 'h': usage(cout); - break; + return 0; case 'o': fs.output = optarg; break;