coreos / bootupd

Bootloader updater
Apache License 2.0
129 stars 24 forks source link

bios: Handle empty pttype from lsblk output #740

Closed travier closed 1 month ago

travier commented 1 month ago

zram, sr0 (CD/DVD) and LUKS devices generally don't use partitions, thus don't have a partition table and thus don't have a partition table type so this field may be null.

Fixes: https://github.com/coreos/bootupd/issues/739

travier commented 1 month ago

(Not tested yet)

cgwalters commented 1 month ago

I pushed a change to fix compilation - would obviously be good to test in the failing scenario for real, but we could also add a unit test fixture JSON.

travier commented 1 month ago

Thanks. I was setting up VMs to test this but got distracted by something else. Will hopefully test tomorrow.

travier commented 1 month ago

I've added a small unit test and manually verified that this works on Fedora Silverblue Rawhide BIOS & UEFI.