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:
Anand Jain 2013-11-07 10:53:43 +08:00 committed by Chris Mason
parent d06b30feb9
commit 90cad5f9e6
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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) {