Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
findmnt: error on --target /non-exist
The original --target implementation (< v2.27) has been based on stat(), so it was usable for valid paths only. The new implementation is based on search in the mountinfo file, so it works for arbitrary crazy path. This is not backwardly compatible and if the path does not exist then it still returns at least root directory mount entry. This patch forces mnt_table_find_mountpoint() to check if the path is valid before we search in the mountinfo file. Signed-off-by: Karel Zak <[email protected]>
- Loading branch information