[PATCH 2/2] libmount: Fix mnt_context_is_child()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It should check if fork (mount -F) is enabled.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
---
 libmount/src/context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmount/src/context.c b/libmount/src/context.c
index 04eb286..a4d9824 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -387,7 +387,7 @@ int mnt_context_is_parent(struct libmnt_context *cxt)
  */
 int mnt_context_is_child(struct libmnt_context *cxt)
 {
-	return !mnt_context_is_fork(cxt) && cxt->pid;
+	return mnt_context_is_fork(cxt) && cxt->pid;
 }
 
 /**
-- 
1.7.9.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux