From: Shiyang Ruan Date: Fri, 2 Nov 2018 09:51:41 +0000 (+0800) Subject: rbd: return error code when the source and distination namespace are different. X-Git-Tag: v14.1.0~1005^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F24893%2Fhead;p=ceph.git rbd: return error code when the source and distination namespace are different. Signed-off-by: Shiyang Ruan --- diff --git a/src/tools/rbd/action/Snap.cc b/src/tools/rbd/action/Snap.cc index 9f49f1d4e356..70cf62dab0cc 100644 --- a/src/tools/rbd/action/Snap.cc +++ b/src/tools/rbd/action/Snap.cc @@ -828,6 +828,7 @@ int execute_rename(const po::variables_map &vm, } else if (namespace_name != dest_namespace_name) { std::cerr << "rbd: source and destination namespace must be the same" << std::endl; + return -EINVAL; } else if (image_name != dest_image_name) { std::cerr << "rbd: source and destination image name must be the same" << std::endl;