Pekka Enberg
2009-Jul-23 18:11 UTC
[PATCH] btrfs-progs: Check /etc/mtab in check_mounted()
From: Pekka Enberg <penberg@cs.helsinki.fi>
The setmntent() lookup for ''/proc/mounts'' returns NULL on
Ubuntu so use
''/etc/mtab'' instead.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
utils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils.c b/utils.c
index 2f4c6e1..af1c6ec 100644
--- a/utils.c
+++ b/utils.c
@@ -600,7 +600,7 @@ int check_mounted(char *file)
FILE *f;
int ret = 0;
- if ((f = setmntent ("/proc/mounts", "r")) == NULL)
+ if ((f = setmntent ("/etc/mtab", "r")) == NULL)
return -errno;
if (stat(file, &st_buf) < 0) {
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html