Package pyanaconda :: Package storage :: Package devicelibs :: Module edd
[hide private]
[frames] | no frames]

Module edd

source code

Classes [hide private]
  EddEntry
This object merely collects what the /sys/firmware/edd/* entries can provide.
  EddMatcher
This object tries to match given entry to a disk device name.
Functions [hide private]
 
biosdev_to_edd_dir(biosdev) source code
 
collect_edd_data() source code
 
collect_mbrs(devices)
Read MBR signatures from devices.
source code
 
get_edd_dict(devices)
Generates the 'device name' -> 'edd number' mapping.
source code
Variables [hide private]
  log = logging.getLogger("storage")
  re_host_bus = re.compile(r'^PCI\s*(\S*)\s*channel: (\S*)\s*$')
  re_interface_scsi = re.compile(r'^SCSI\s*id: (\S*)\s*lun: (\S*...
  re_interface_ata = re.compile(r'^ATA\s*device: (\S*)\s*$')
Function Details [hide private]

collect_mbrs(devices)

source code 

Read MBR signatures from devices.

Returns a dict mapping device names to their MBR signatures. It is not guaranteed this will succeed, with a new disk for instance.

get_edd_dict(devices)

source code 

Generates the 'device name' -> 'edd number' mapping.

The EDD kernel module that exposes /sys/firmware/edd is thoroughly broken, the information there is incomplete and sometimes downright wrong. So after we mine out all useful information that the files under /sys/firmware/edd/int13_*/ can provide, we resort to heuristics and guessing. Our first attempt is, by looking at the device type int 'interface', attempting to map pci device number, channel number etc. to a sysfs path, check that the path really exists, then read the device name (e.g 'sda') from there. Should this fail we try to match contents of 'mbr_signature' to a real MBR signature found on the existing block devices.


Variables Details [hide private]

re_interface_scsi

Value:
re.compile(r'^SCSI\s*id: (\S*)\s*lun: (\S*)\s*$')