Merge pull request #24815 from iridescent-rsy/remove-ceph_abort

rbd-nbd: do not ceph_abort() after print the usages

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2018-11-06 11:11:09 -05:00 committed by GitHub
commit ea4411f9a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1164,12 +1164,11 @@ static int rbd_nbd(int argc, const char *argv[])
r = parse_args(args, &err_msg, &cmd, &cfg);
if (r == HELP_INFO) {
usage();
ceph_abort();
return 0;
} else if (r == VERSION_INFO) {
std::cout << pretty_version_to_str() << std::endl;
return 0;
}
else if (r < 0) {
} else if (r < 0) {
cerr << err_msg.str() << std::endl;
return r;
}
@ -1197,7 +1196,6 @@ static int rbd_nbd(int argc, const char *argv[])
break;
default:
usage();
ceph_abort();
break;
}