From 90cad5f9e6f55947bd5e5b64dd9e44bdd02982b3 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Thu, 7 Nov 2013 10:53:43 +0800 Subject: btrfs-progs: use /proc/self/mounts Signed-off-by: Anand Jain Signed-off-by: David Sterba Signed-off-by: Chris Mason --- cmds-send.c | 2 +- utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-send.c b/cmds-send.c index 53e9a53d..43ea06b5 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -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; diff --git a/utils.c b/utils.c index 81cae6d1..3c9701dd 100644 --- a/utils.c +++ b/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) { -- cgit v1.2.3