linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: use /proc/self/mounts
Date: Thu,  7 Nov 2013 10:53:43 +0800	[thread overview]
Message-ID: <1383792823-24594-1-git-send-email-anand.jain@oracle.com> (raw)

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 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 53e9a53..43ea06b 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 ebd10e5..d2138dd 100644
--- a/utils.c
+++ b/utils.c
@@ -996,7 +996,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) {
-- 
1.7.1


                 reply	other threads:[~2013-11-07  2:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383792823-24594-1-git-send-email-anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).