btrfs-progs: Check /etc/mtab in check_mounted()
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.
Signed-off-by Pekka Enberg <[email protected]>
--- utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
utils.c +1 -1
@@ -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