Re: [PATCH 1/3] Sort Storage.devices using isys.compareDrives for consistency.

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

 



Hi,

On 12/22/2009 02:26 AM, David Lehman wrote:
---
  storage/__init__.py |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 2dbbfb8..bc63e43 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -370,7 +370,7 @@ class Storage(object):
      def devices(self):
          """ A list of all the devices in the device tree. """
          devices = self.devicetree.devices
-        devices.sort(key=lambda d: d.path)
+        devices.sort(key=lambda d: d.path, cmp=isys.compareDrives)
          return devices

      @property

Note that isys.compareDrives only works for
disks, and if something is not recognized it automatically gets
a lower prio then recognized thinks

So if the bios order is sdb, sda, and you pass in:

[ "sda", "sda1", "sdb", "sdb1" ]

You will end up with:

[ "sdb", "sda", "sda1", "sdb1" ]

IOW I'm not sure about this one.

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