]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd:Check the dest image name, if it is empty string, refuse to execute and give... 5560/head
authorroot <root@ubuntu1.com>
Thu, 13 Aug 2015 03:16:49 +0000 (23:16 -0400)
committerroot <root@ubuntu1.com>
Thu, 13 Aug 2015 03:18:56 +0000 (23:18 -0400)
Signed-off-by: solesoul1127 <chen.yehua@h3c.com>
src/rbd.cc

index ff3d46da3073a5372a7c51b6119f7ceb4640df3c..5a007325e3c25b26cb060c0462b74f521387d93e 100644 (file)
@@ -3474,7 +3474,7 @@ if (!set_conf_param(v, p1, p2, p3)) { \
   }
 
   if ((opt_cmd == OPT_COPY || opt_cmd == OPT_CLONE || opt_cmd == OPT_RENAME) &&
-      !destname ) {
+      ((!destname) || (destname[0] == '\0')) ) {
     cerr << "rbd: destination image name was not specified" << std::endl;
     return EXIT_FAILURE;
   }