mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
tools/osdmaptool: exit if we are unable to resolve pg_num
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
This commit is contained in:
parent
ac8c40f3e3
commit
c97ec99579
@ -137,8 +137,10 @@ int main(int argc, const char **argv)
|
||||
} else if (ceph_argparse_witharg(args, i, &val, err, "--pg_num", (char*)NULL)) {
|
||||
string interr;
|
||||
pg_num = strict_strtoll(val.c_str(), 10, &interr);
|
||||
if (interr.length() > 0)
|
||||
if (interr.length() > 0) {
|
||||
cerr << "error parsing integer value " << interr << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else if (ceph_argparse_witharg(args, i, &range_first, err, "--range_first", (char*)NULL)) {
|
||||
} else if (ceph_argparse_witharg(args, i, &range_last, err, "--range_last", (char*)NULL)) {
|
||||
} else if (ceph_argparse_witharg(args, i, &pool, err, "--pool", (char*)NULL)) {
|
||||
|
Loading…
Reference in New Issue
Block a user