Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   Add ID_SERIAL in as a backup in case there's no ID_SERIAL_SHORT. (http://www.linux-archive.org/device-mapper-development/320199-add-id_serial-backup-case-theres-no-id_serial_short.html)

Chris Lumens 02-03-2010 06:36 PM

Add ID_SERIAL in as a backup in case there's no ID_SERIAL_SHORT.
 
---
storage/udev.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 7ed7cc4..4bef451 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -242,7 +242,7 @@ def udev_device_is_partition(info):

def udev_device_get_serial(udev_info):
""" Get the serial number/UUID from the device as reported by udev. """
- return udev_info.get("ID_SERIAL_SHORT")
+ return udev_info.get("ID_SERIAL_SHORT", udev_info.get("ID_SERIAL"))

def udev_device_get_wwid(udev_info):
""" The WWID of a device is typically just its serial number, but with
--
1.6.5.1

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


All times are GMT. The time now is 03:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.