From: Dan Mick Date: Mon, 24 Apr 2017 22:35:14 +0000 (-0700) Subject: common/ConfUtils.cc: ConfFile:parse_file: warn about ENOENT X-Git-Tag: v12.0.3~245^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=623e1a8eeb56f9f7caa779d2bec2b6821ac442b0;p=ceph.git common/ConfUtils.cc: ConfFile:parse_file: warn about ENOENT Consider ENOENT an error; it may or may not be reported, but accumulate it as if it might be Signed-off-by: Dan Mick --- diff --git a/src/common/ConfUtils.cc b/src/common/ConfUtils.cc index 2c403d950c8f..ff9055a8164c 100644 --- a/src/common/ConfUtils.cc +++ b/src/common/ConfUtils.cc @@ -101,6 +101,9 @@ parse_file(const std::string &fname, std::deque *errors, char *buf = NULL; FILE *fp = fopen(fname.c_str(), "r"); if (!fp) { + ostringstream oss; + oss << "parse_file: cannot open " << fname << ": " << cpp_strerror(errno); + errors->push_back(oss.str()); ret = -errno; return ret; }