From: Jason Dillaman Date: Mon, 20 Nov 2017 16:03:17 +0000 (-0500) Subject: rbd: disk usage on empty pool no longer returns an error message X-Git-Tag: v13.0.1~140^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4528122d66d1bc7dd07a64d1af7b65fe53f7b0b;p=ceph.git rbd: disk usage on empty pool no longer returns an error message Fixes: http://tracker.ceph.com/issues/22200 Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd/action/DiskUsage.cc b/src/tools/rbd/action/DiskUsage.cc index 9934e81dd21fe..5da9fec3f1907 100644 --- a/src/tools/rbd/action/DiskUsage.cc +++ b/src/tools/rbd/action/DiskUsage.cc @@ -208,7 +208,7 @@ static int do_disk_usage(librbd::RBD &rbd, librados::IoCtx &io_ctx, ++count; } } - if (!found) { + if (imgname != nullptr && !found) { std::cerr << "specified image " << imgname << " is not found." << std::endl; return -ENOENT; }