Commit graph

8 commits

Author SHA1 Message Date
Andrei Borzenkov
3bca85b418 devmapper: check for valid device abstraction in get_grub_dev
This was lost when code was refactored. Patch restores previous behavior.

It is still not clear whether this is the right one. Due to the way we
detect DM abstraction, partitions on DM are skipped, we fall through to
generic detection which ends up in assuming parent device is BIOS disk.

It is useful to install GRUB on VM disk from the host. But it also means
that GRUB will mistakenly allow install on real system as well.

For now let's fix regression; future behavior needs to be discussed.

Closes: 45163
2015-12-26 21:45:22 +03:00
Andrei Borzenkov
349a381df0 devmapper/getroot: use makedev instead of direct shift
Fixes device detection with large number of devices.

Reported by Tim Wallberg <twalberg@comcast.net>
2015-11-07 09:46:46 +03:00
Vladimir Serbinenko
c14dff3ca7 devmapper/getroot: Fix memory leak.
Found by: Coverity scan.
2015-01-26 09:50:27 +01:00
Vladimir Serbinenko
f7c7c4d4ad Make grub_util_device_is_mapped_stat available in grub-emu core. 2013-12-24 16:56:14 +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 'phcoder' Serbinenko
cd78a56fb2 Move stat () and device mode checking into OS-dependent files as
long as performance doesn't suffer.
2013-10-19 16:29:20 +02:00
Vladimir 'phcoder' Serbinenko
acbbe5cbad * include/grub/util/lvm.h: Removed. 2013-10-08 21:01:09 +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
Renamed from util/getroot_devmapper.c (Browse further)