bootman: Allow native UEFI to "win" on GPT system containing legacy boot
bootman: Allow native UEFI to "win" on GPT system containing legacy boot

Given the nature of a GPT system, it is permitted to have a legacy boot
partition, *and* an EFI System Partition. Thus, prior to this commit, a
chroot repair of a system would only ever find the legacy boot partition
and not the UEFI partition.

Likewise, in a booted system, we would run into the same problem, leading
to bricked systems on update. Now, we'll only try to determine a legacy
boot device if we're definitely not running in native UEFI mode, that is
to say, !image_mode, and /sys/firmware/efi exists. This allows us to skip
an unusable partition in favour of our ESP.

This commit fixes #58.

Signed-off-by: Ikey Doherty <15e2f59c60e9d84348e78a87e24660774f739add@intel.com>

ikeydoherty/clr-boot-manager,ikeydoherty/clr-boot-manager,ikeydoherty/clr-boot-manager,ikeydoherty/clr-boot-manager