]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: return error code when the source and distination namespace are different. 24893/head
authorShiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Fri, 2 Nov 2018 09:51:41 +0000 (17:51 +0800)
committerShiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Fri, 2 Nov 2018 09:51:41 +0000 (17:51 +0800)
Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>
src/tools/rbd/action/Snap.cc

index 9f49f1d4e35635816c5f9634ff7cfc8941439455..70cf62dab0cc406000ed2205c54c0db5bc26447e 100644 (file)
@@ -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;