]> git.ipfire.org Git - thirdparty/grub.git/commit
efidisk: prevent errors from diskfilter scan of removable drives
authorAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 26 Feb 2016 18:44:37 +0000 (21:44 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 26 Feb 2016 18:44:37 +0000 (21:44 +0300)
commitb00e4c2bd9fd051678a8aadafa95ad14b3c866ba
tree6583f05f2c4a4211067512831d73ff5beaf65f4f
parent06a3b0b214d077cc2a52a6295175de3c79c04113
efidisk: prevent errors from diskfilter scan of removable drives

Map EFI_NO_MEDIA to GRUB_ERR_OUT_OF_RANGE that is ignored by diskfilter. This
actually matches pretty close (we obviously attempt to read outside of media)
and avoids adding more error codes.

This affects only internally initiated scans. If read/write from removable is
explicitly requested, we still return an error and text explanation is more
clear for user than generic error.

Reported and tested by Andreas Loew <Andreas.Loew@gmx.net>
grub-core/disk/efi/efidisk.c