mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
Merge pull request #5558 from s09816/rbd-fix
rbd:improve the error handle of rbd,check the return value. Reviewed-by: Jason Dillaman <dillaman@redhat.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
commit
d43d6844ec
5
src/rbd.cc
Normal file → Executable file
5
src/rbd.cc
Normal file → Executable file
@ -3097,7 +3097,10 @@ int main(int argc, const char **argv)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
format_specified = true;
|
||||
g_conf->set_val_or_die("rbd_default_format", val.c_str());
|
||||
if (0 != g_conf->set_val("rbd_default_format", val.c_str())) {
|
||||
cerr << "rbd: image format must be 1 or 2" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
} else if (ceph_argparse_witharg(args, i, &val, "-p", "--pool", (char*)NULL)) {
|
||||
poolname = strdup(val.c_str());
|
||||
} else if (ceph_argparse_witharg(args, i, &val, "--dest-pool", (char*)NULL)) {
|
||||
|
Loading…
Reference in New Issue
Block a user