Re: [PATCH 5/7] Modify StorageDevice.fstabSpec() to use by-path for DASD (#526364).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack

Sorry for the late code review, but it looked OK so I deferred my comments.

On 10/08/2009 09:28 AM, David Cantrell wrote:
> If the partition is on a DASD disk, write out the /dev/disk/by-path/...
> value to the /etc/fstab file rather than a UUID= line.
> ---
>  storage/devices.py |   17 ++++++++++++++---
>  1 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/storage/devices.py b/storage/devices.py
> index 9d257e2..6cd7b5a 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -556,9 +556,20 @@ class StorageDevice(Device):
> 
>      @property
>      def fstabSpec(self):
> -        spec = self.path
> -        if self.format and self.format.uuid:
> -            spec = "UUID=%s" % self.format.uuid
> +        spec = None
> +
> +        try:
> +            if self.format:
> +                if self.disk and self.disk.format.partedDisk.type == 'dasd':

How does this related to udev_device_is_dasd() of your "[PATCH 6/7] Add
udev_device_is_dasd() to detect DASD devices"? I'm just wondering if
there would be potential for more consistency.

> +                    spec = deviceNameToDiskByPath(self.path)
> +                elif self.format.uuid:
> +                    spec = "UUID=%s" % self.format.uuid
> +        except AttributeError as msg:
> +            log.error("fstabSpec called for %s: %s" % (self.path, msg,))
> +
> +        if not spec:
> +            spec = self.path
> +
>          return spec
> 
>      def resize(self, intf=None):

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux