Skip to contentSkip to conversation

btrfs-progs: Check /etc/mtab in check_mounted()

PATCH New Pekka Enberg 1 participant 1 message Jul 23, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: Check /etc/mtab in check_mounted()

From: Pekka Enberg <[email protected]>

The setmntent() lookup for '/proc/mounts' returns NULL on Ubuntu so use '/etc/mtab' instead.

---
 utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
utils.c +1 -1
index 2f4c6e1..af1c6ec 100644
@@ -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) {
Signature · 1 line
1.5.6.3