disk: use entityPath in ContainsMountpoint
Implement `PartitionTable.ContainsMountpoint` via `entityPath` instead of `FindFileSystemForMountpoint`; `entityPath` is the more generic variant of `FindFileSystemForMountpoint` and will work with anything that implements `Mountable`. Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
This commit is contained in:
parent
bd5b673a99
commit
908b62ae08
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ func (pt *PartitionTable) FindFilesystemForMountpoint(mountpoint string) *Filesy
|
|||
// Returns if the partition table contains a filesystem with the given
|
||||
// mount point.
|
||||
func (pt *PartitionTable) ContainsMountpoint(mountpoint string) bool {
|
||||
return pt.FindFilesystemForMountpoint(mountpoint) != nil
|
||||
return len(entityPath(pt, mountpoint)) > 0
|
||||
}
|
||||
|
||||
// Returns the Filesystem instance that corresponds to the root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue