diff options
author | David Sterba <dsterba@suse.cz> | 2013-11-27 18:22:34 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-31 08:22:07 -0800 |
commit | 387d5f32347e426214389e0251a1240e076d250d (patch) | |
tree | a2cc5a9df370f3e6433e863efdc4dd4fd95b3262 /cmds-send.c | |
parent | 37cd29521a01135335d0d0657829a182fa261a74 (diff) |
btrfs-progs: use mntent functions in find_mount_root
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>
Diffstat (limited to 'cmds-send.c')
-rw-r--r-- | cmds-send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds-send.c b/cmds-send.c index 43ea06b5..3d217151 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/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, |