cholcombe973 / block-utils

Rust utilities for working with block devices
MIT License
22 stars 17 forks source link

Return only the Specified path's mountpoint #6

Closed mzhong1 closed 4 years ago

mzhong1 commented 4 years ago

Changed get_mountpoint so only the specific device path is searched for in /etc/mtab. Disks will no longer have the mountpoint of one of its partitions returned.

Before, if input was /dev/sdX (with no mountpoint), however /dev/sdX# had a mountpoint, that mountpoint was returned

Now, only /dev/sdX will only have a mountpoint returned if it is mounted.