edd_id util

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

 



Hello,

edd_id is a nice small util of udev to match device to its edd record
(/sys/firmware/edd/int13_
dev8X).

Looking at its code, the way it matches devices is only by their mbr
signature. Therefore, if the disk is wiped (or new), it won't be able
to match anything, and will return 6 (no valid MBR signature).

I think in such case, another method for matching should be
considered. the records in sysfs have a file named sectors, which is
the device capacity in sectors. proc holds a similar file for kernel
devices in /proc/ide/[hs]dX/capacity.

These files can be compared to match device to edd dev... If there is
more than 1 device with the exact same capacity, it might print the
first or not print anything, and exit with error.

I agree the best way to match is by signature, but if it is not found
- IMHO the alternative way should be taken.
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux