ceph-objectstore-tool: Add dump-journal as not requiring --pgid in usage

Additional comment describes --pgid requirement checking

Signed-off-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
David Zafman 2015-05-18 20:08:14 -07:00
parent a1de1fc20e
commit bd2f62445b

View File

@ -2535,7 +2535,7 @@ int main(int argc, char **argv)
("journal-path", po::value<string>(&jpath),
"path to journal, mandatory for filestore type")
("pgid", po::value<string>(&pgidstr),
"PG id, mandatory except for import, fix-lost, list-pgs, set-allow-sharded-objects")
"PG id, mandatory except for import, fix-lost, list-pgs, set-allow-sharded-objects, dump-journal")
("op", po::value<string>(&op),
"Arg is one of [info, log, remove, export, import, list, fix-lost, list-pgs, rm-past-intervals, set-allow-sharded-objects, dump-journal]")
("file", po::value<string>(&file),
@ -2940,6 +2940,10 @@ int main(int argc, char **argv)
}
}
// The ops which don't require --pgid option are checked here and
// mentioned in the usage for --pgid with some exceptions.
// The dump-journal op isn't here because it is handled earlier.
// The dump-journal-mount op is undocumented so not in the usage.
if (op != "list" && op != "import" && op != "fix-lost"
&& op != "list-pgs" && op != "set-allow-sharded-objects" &&
op != "dump-journal-mount" && (pgidstr.length() == 0)) {