[PATCH] Mountpoint detection for removable devices

David Lehman dlehman at redhat.com
Tue Nov 18 17:50:39 UTC 2014


On 11/18/2014 11:07 AM, Vojtech Trefny wrote:
> ---
>
> Removable devices are mounted with '-o nodev' by default.

Really? I thought nodev was only for things like tmpfs and proc where 
there is no backing device.

>
>   blivet/devicetree.py | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index 7f3f73a..543eb44 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -2492,6 +2492,8 @@ class DeviceTree(object):
>                       break
>           elif options and "nodev" in options.split(","):
>               device = self.getDeviceByName(devspec)
> +            if not device:
> +                device = self.getDeviceByPath(devspec)
>           else:
>               if not devspec.startswith("/dev/"):
>                   device = self.getDeviceByName(devspec)
>



More information about the anaconda-patches mailing list