]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/config.cc md_config_t::parse_config_files: return ENOENT
authorDan Mick <dan.mick@redhat.com>
Mon, 24 Apr 2017 22:36:45 +0000 (15:36 -0700)
committerDan Mick <dan.mick@redhat.com>
Mon, 24 Apr 2017 22:43:26 +0000 (15:43 -0700)
If the only error we get is ENOENT, pass that back instead of
EINVAL, as it more-accurately reflects the error(s)

Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/common/config.cc

index 9bad60b31ffb20cc3741d548753566df4e710f90..9fef25d209c47083d91943183e7404d20a31cfe8 100644 (file)
@@ -302,8 +302,9 @@ int md_config_t::parse_config_files_impl(const std::list<std::string> &conf_file
     else if (ret != -ENOENT)
       return ret;
   }
+  // it must have been all ENOENTs, that's the only way we got here
   if (c == conf_files.end())
-    return -EINVAL;
+    return -ENOENT;
 
   if (cluster.size() == 0) {
     /*