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
(parent:
37cd295
)
btrfs-progs: use mntent functions in find_mount_root
author
David Sterba
<dsterba@suse.cz>
Wed, 27 Nov 2013 17:22:34 +0000
(18:22 +0100)
committer
Chris Mason
<clm@fb.com>
Fri, 31 Jan 2014 16:22:07 +0000
(08:22 -0800)
getmntent should be used in context of *mntent functions, though
fopen/fclose works.
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
cmds-send.c
patch
|
blob
|
history
diff --git
a/cmds-send.c
b/cmds-send.c
index
43ea06b
..
3d21715
100644
(file)
--- 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/self/mounts", "r");
+ mnttab =
setmntent
("/proc/self/mounts", "r");
if (!mnttab)
return -errno;
@@
-87,7
+87,7
@@
int find_mount_root(const char *path, char **mount_root)
}
}
}
-
fclose
(mnttab);
+
endmntent
(mnttab);
if (!longest_match) {
fprintf(stderr,