Vladimir Serbinenko
c2fc41990a
linux/hostdisk: Limit strcpy size to buffer size.
...
Found by: Coverity scan.
2015-01-27 16:48:53 +01:00
Vladimir Serbinenko
e88f0420b9
Make grub_util_devmapper_part_to_disk and grub_util_find_partition_start
...
follow the same algorithm to avoid method mismatch. Don't assume
DMRAID- UUID to mean full disk but instead check that mapping is linear.
2013-12-24 14:16:57 +01:00
Vladimir Serbinenko
ae558c2ccf
Enable -Wformat=2 if it's supported.
2013-12-21 15:28:28 +01:00
Colin Watson
59b38922a1
Pacify compiler warning
...
* grub-core/osdep/linux/hostdisk.c
(grub_util_find_partition_start_os): Initialise start to avoid
spurious compiler warning.
2013-12-05 15:48:27 +00:00
Colin Watson
0480665b9d
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.
2013-12-05 13:51:52 +00:00
Vladimir 'phcoder' Serbinenko
b73249d260
Make grub_util_fd_seek match behaviour of other grub_util_fd_* and
...
fseeko.
2013-10-14 12:47:09 +02:00
Vladimir 'phcoder' Serbinenko
37149a2f20
* include/grub/emu/hostdisk.h (grub_hostdisk_linux_find_partition):
...
Removed.
* grub-core/osdep/linux/hostdisk.c (grub_hostdisk_linux_find_partition):
Made static.
2013-10-09 07:16:20 +02:00
Vladimir 'phcoder' Serbinenko
672fa55e81
Move OS-dependent files to grub-core/osdep and document it.
2013-10-08 17:30:22 +02:00