]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs: negative error return of ceph_ll_lookup_root()
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 18 Jun 2016 06:11:11 +0000 (14:11 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 18 Jun 2016 06:11:11 +0000 (14:11 +0800)
Generally speaking, a zero or positive return code of (POSIX-style) call
shall indicates success, and a negative value means something really bad
happens by constrast.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/libcephfs.cc

index d04633484118966d86785b9178c7f0c88ace4848..87f365ed1b6857b2148df752c251d3ce97b3993d 100644 (file)
@@ -1319,7 +1319,7 @@ extern "C" int ceph_ll_lookup_root(struct ceph_mount_info *cmount,
   *parent = cmount->get_client()->get_root();
   if (*parent)
     return 0;
-  return EFAULT;
+  return -EFAULT;
 }
 
 extern "C" struct Inode *ceph_ll_get_inode(class ceph_mount_info *cmount,