Re: [PATCH 5/8] Collect DASD kernel parameter information during device tree scan (#526354).

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

 



On 10/10/2009 02:44 AM, David Cantrell wrote:
> On Sat, 10 Oct 2009, Steffen Maier wrote:
>> On 10/10/2009 12:27 AM, David Cantrell wrote:

>>> diff --git a/storage/udev.py b/storage/udev.py
>>> index d051157..bbaa977 100644
>>> --- a/storage/udev.py
>>> +++ b/storage/udev.py
>>> @@ -165,6 +165,21 @@ def udev_device_is_dasd(info):
>>>      else:
>>>          return False
>>>
>>> +def udev_device_get_dasd_bus_id(info):
>>> +    """ Return the CCW bus ID of the dasd device. """
>>> +    return info.get("ID_PATH").split('-')[2]
>>
>> ID_PATH is yet from some other program that generated it (path_id) out
>> of sysfs data, which would be the definitive source: The path of the
>> udev DB is, e.g.
>> "/devices/css0/0.0.0005/0.0.eb26/block/dasda/dasda1"
>>                        ^^^^^^^^
>> and there we could get the device bus ID directly.
>> Or readlink (with splitting) of /sys/block/dasda/device , but there we
>> would need to strip the partition numbers first to get to the block
>> device itself which does not seem very clean. There are just too many
>> ways.
>>
>> The parsing with splitting looks fragile. Remember my recent patch for
>> the parser of ifcfg files?
> 
> Yeah, I'm not crazy about this line.  If there is a better way to find
> the bus
> ID, I'd like to use it.  lsdasd has output I like, so maybe I'll look
> there.

Please don't use lsdasd. That's even more indirection than ID_PATH.
Also, why should we rely on another shell script, which in turn relies
on sysfs or procfs, when we can get the truth from sysfs directly?

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