[thin_generate_damage] Add help text

This commit is contained in:
Ming-Hung Tsai 2020-07-29 18:01:57 +08:00
parent 80965944c6
commit 90f2d43a95

View File

@ -91,6 +91,15 @@ thin_generate_damage_cmd::thin_generate_damage_cmd()
void void
thin_generate_damage_cmd::usage(std::ostream &out) const thin_generate_damage_cmd::usage(std::ostream &out) const
{ {
out << "Usage: " << get_name() << " [options]\n"
<< "Options:\n"
<< " {-h|--help}\n"
<< " {-o|--output} <output device or file>\n"
<< " {--create-metadata-leaks}\n"
<< " {--nr-blocks} <block counts>\n"
<< " {--expected} <expected ref-count>\n"
<< " {--actual} <actual ref-count>\n"
<< " {-V|--version}" << endl;
} }
int int
@ -114,7 +123,7 @@ thin_generate_damage_cmd::run(int argc, char **argv)
switch(c) { switch(c) {
case 'h': case 'h':
usage(cout); usage(cout);
break; return 0;
case 'o': case 'o':
fs.output = optarg; fs.output = optarg;
break; break;