mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-31 00:24:17 +00:00
ba4fcefcea
Currently, /media is mounted once per boot, which causes issues if a user need to change USB sticks, or unknowning performs an operation that mounts /media and then needs to access a different USB stick later (eg, updating the firmware). To mitigate this, always unmount /media if mounted before scanning for USB devices, so the user can choose the correct device at the time of its use. Additionally, add a unique exit code for user abort so we're not treating it the same as a failure, and use it to prevent unnecessary GUI prompts when cancelling selection of a USB device. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>