]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/tools/rbd/action/Config.cc
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / tools / rbd / action / Config.cc
index 40093172ff845bb012cb762ab3360e624701f503..2868c7ad1d743ed2814add8bc3dcb6c58d1df291 100644 (file)
@@ -676,7 +676,11 @@ int execute_image_set(const po::variables_map &vm,
     return r;
   }
 
-  std::string value = utils::get_positional_argument(vm, 2);
+  std::string value = utils::get_positional_argument(vm, arg_index);
+  if (value.empty()) {
+    std::cerr << "rbd: image config value was not specified" << std::endl;
+    return -EINVAL;
+  }
 
   librados::Rados rados;
   librados::IoCtx io_ctx;