projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
08fecd7
)
Btrfs-progs: Use /proc/mounts instead of /etc/mtab
author
Stefan Behrens
<sbehrens@giantdisaster.de>
Mon, 25 Mar 2013 14:21:42 +0000
(15:21 +0100)
committer
David Sterba
<dsterba@suse.cz>
Tue, 9 Apr 2013 16:43:32 +0000
(18:43 +0200)
/etc/mtab is not working correctly in situations where multiple
mount namespaces are used. Use /proc/mounts instead like the
rest of the code is doing it.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
cmds-send.c
patch
|
blob
|
history
diff --git
a/cmds-send.c
b/cmds-send.c
index
b2a340e
..
5a7183d
100644
(file)
--- a/
cmds-send.c
+++ b/
cmds-send.c
@@
-70,7
+70,7
@@
int find_mount_root(const char *path, char **mount_root)
return -errno;
close(fd);
- mnttab = fopen("/
etc/mtab
", "r");
+ mnttab = fopen("/
proc/mounts
", "r");
while ((ent = getmntent(mnttab))) {
len = strlen(ent->mnt_dir);
if (strncmp(ent->mnt_dir, path, len) == 0) {