Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: utils: introduce find_mount_fsroot
This new function checks for filesystem path name that was mounted, thus being different from find_mount_root. By using libmount we can easily parse /proc/self/mountinfo file and check for the pathname field. The function is useful to filter bind mounts with content different from the original mount, thus making it safe to assume that the reported path can be accessed by the user, with the right content. Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
- Loading branch information
Showing
2 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters