btrfs-progs: use /proc/self/mounts
Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
d06b30feb9
commit
90cad5f9e6
2 changed files with 2 additions and 2 deletions
|
@ -72,7 +72,7 @@ int find_mount_root(const char *path, char **mount_root)
|
|||
return -errno;
|
||||
close(fd);
|
||||
|
||||
mnttab = fopen("/proc/mounts", "r");
|
||||
mnttab = fopen("/proc/self/mounts", "r");
|
||||
if (!mnttab)
|
||||
return -errno;
|
||||
|
||||
|
|
2
utils.c
2
utils.c
|
@ -997,7 +997,7 @@ int check_mounted_where(int fd, const char *file, char *where, int size,
|
|||
}
|
||||
|
||||
/* iterate over the list of currently mountes filesystems */
|
||||
if ((f = setmntent ("/proc/mounts", "r")) == NULL)
|
||||
if ((f = setmntent ("/proc/self/mounts", "r")) == NULL)
|
||||
return -errno;
|
||||
|
||||
while ((mnt = getmntent (f)) != NULL) {
|
||||
|
|
Loading…
Reference in a new issue