From 99c7696a278495ad3793e7cdf34b0d6edd900208 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sat, 18 Jun 2016 14:11:11 +0800 Subject: [PATCH] libcephfs: negative error return of ceph_ll_lookup_root() 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 --- src/libcephfs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcephfs.cc b/src/libcephfs.cc index d046334841189..87f365ed1b685 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -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, -- 2.39.5