Btrfs-progs: replace find_mount_root from send code
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Mon, 20 Aug 2012 11:40:18 +0000 (13:40 +0200)
committerJan Schmidt <list.btrfs@jan-o-sch.net>
Mon, 20 Aug 2012 11:40:18 +0000 (13:40 +0200)
commitf99b1f1a631f3dfb8dc9ad03b9a00bdc2a231d31
tree89943d439eb92702b0876d12ccd575137ed7618c
parent043a63924c9831ac52ce38f0365b9bfd628fb6a3
Btrfs-progs: replace find_mount_root from send code

find_mount_root had the problem that it tried to conclude from a file system
path to a mount point, taking the fsid as an indicator. This only works if
no two subvolumes (sharing the same btrfs fsid) are mounted in the same
hierarchy.

Now instead, we're parsing /etc/mtab and look for the longest match.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
cmds-send.c