]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ext_mime_map_init add string describing for error number 9807/head
authorYan Jun <yan.jun8@zte.com.cn>
Mon, 20 Jun 2016 06:16:52 +0000 (14:16 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Mon, 20 Jun 2016 06:23:57 +0000 (14:23 +0800)
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
src/rgw/rgw_tools.cc

index e97b432f007990167a9a14e9e8716841926d94a0..5f649554020255e8a68a6daead40d30063e7983d 100644 (file)
@@ -123,7 +123,8 @@ static int ext_mime_map_init(CephContext *cct, const char *ext_map)
   int ret;
   if (fd < 0) {
     ret = -errno;
-    ldout(cct, 0) << "ext_mime_map_init(): failed to open file=" << ext_map << " ret=" << ret << dendl;
+    ldout(cct, 0) << __func__ << " failed to open file=" << ext_map
+                  << " : " << cpp_strerror(-ret) << dendl;
     return ret;
   }
 
@@ -131,21 +132,22 @@ static int ext_mime_map_init(CephContext *cct, const char *ext_map)
   ret = fstat(fd, &st);
   if (ret < 0) {
     ret = -errno;
-    ldout(cct, 0) << "ext_mime_map_init(): failed to stat file=" << ext_map << " ret=" << ret << dendl;
+    ldout(cct, 0) << __func__ << " failed to stat file=" << ext_map
+                  << " : " << cpp_strerror(-ret) << dendl;
     goto done;
   }
 
   buf = (char *)malloc(st.st_size + 1);
   if (!buf) {
     ret = -ENOMEM;
-    ldout(cct, 0) << "ext_mime_map_init(): failed to allocate buf" << dendl;
+    ldout(cct, 0) << __func__ << " failed to allocate buf" << dendl;
     goto done;
   }
 
   ret = safe_read(fd, buf, st.st_size + 1);
   if (ret != st.st_size) {
     // huh? file size has changed?
-    ldout(cct, 0) << "ext_mime_map_init(): raced! will retry.." << dendl;
+    ldout(cct, 0) << __func__ << " raced! will retry.." << dendl;
     free(buf);
     close(fd);
     return ext_mime_map_init(cct, ext_map);