[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
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
@ -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;