From: Pekka Enberg <penberg@cs.helsinki.fi>
To: chris.mason@oracle.com
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: Check /etc/mtab in check_mounted()
Date: Thu, 23 Jul 2009 21:11:08 +0300 [thread overview]
Message-ID: <1248372668.7187.2.camel@penberg-laptop> (raw)
From: Pekka Enberg <penberg@cs.helsinki.fi>
The setmntent() lookup for '/proc/mounts' returns NULL on Ubuntu so use
'/etc/mtab' instead.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
utils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils.c b/utils.c
index 2f4c6e1..af1c6ec 100644
--- a/utils.c
+++ b/utils.c
@@ -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) {
--
1.5.6.3
reply other threads:[~2009-07-23 18:11 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=1248372668.7187.2.camel@penberg-laptop \
--to=penberg@cs.helsinki.fi \
--cc=chris.mason@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