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]

 



Hi,

On 10/08/2009 10:21 AM, David Cantrell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 8 Oct 2009, Hans de Goede wrote:

sorry, but NACK,

This sort of device specific handling should not be done in the
generic StorageDevice class, instead
devicetree.py: addUdevDiskDevice()
Should be teached to recognize DASD disks and add them with a type
of DASDDevice, and DASDDevice should override fstabSpec().


That was my original approach (which also explains the udev patches
after this
one), but DASDDevice extends DiskDevice. Where I need to override fstabSpec
for DASD is in PartitionDevice. So I created a DASDPartitionDevice and did
things that way, which looked pretty ugly to me, so I ended up doing this
instead.

DASDDevice is for /dev/dasda, /dev/dasdb, and so on. The partitions such as
/dev/dasda1 or /dev/dasdb1 become PartitionDevice objects.

I guess I'll go create the DASDPartitionDevice class anyway so I can
override
fstabSpec there.



Ah true, no please don't deriving from PartitionDevice is a bad idea in general
(been there done that with dmraid)

How about ?

In PartitionDevice:

@property
def fstabSpec(self):
    spec = self.path
    if self.disk and self.disk.type == "dasd":
        spec = deviceNameToDiskByPath(self.path)
    elif self.format and self.format.uuid:
        spec = "UUID=%s" % self.format.uuid

    return spec

Regards,

Hans

_______________________________________________
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