On Linux, read partition start offsets from sysfs if possible
authorColin Watson <cjwatson@ubuntu.com>
Thu, 5 Dec 2013 13:51:52 +0000 (13:51 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Thu, 5 Dec 2013 13:51:52 +0000 (13:51 +0000)
commit0480665b9de31aefc7f1d95448efdf8349997fe9
tree4be74a5d000a09cbf5e3991950a33bc23b7927b7
parentbbeee1c4a358b00bd33268d0161fd23cae7f8274
On Linux, read partition start offsets from sysfs if possible

This lets us cope with block device drivers that don't implement
HDIO_GETGEO.  Fixes Ubuntu bug #1237519.

* grub-core/osdep/linux/hostdisk.c (sysfs_partition_path): New
function.
(sysfs_partition_start): Likewise.
(grub_util_find_partition_start_os): Try sysfs_partition_start
before HDIO_GETGEO.
ChangeLog
grub-core/osdep/linux/hostdisk.c