Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bios: Handle empty pttype from lsblk output #740

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

travier
Copy link
Member

@travier travier commented Oct 2, 2024

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: #739

@travier
Copy link
Member Author

travier commented Oct 2, 2024

(Not tested yet)

@cgwalters
Copy link
Member

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
Copy link
Member Author

travier commented Oct 2, 2024

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

@travier travier force-pushed the main-option-pttype branch 2 times, most recently from cb0daa1 to fe4b06f Compare October 4, 2024 08:54
@travier
Copy link
Member Author

travier commented Oct 4, 2024

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

@travier travier marked this pull request as ready for review October 4, 2024 10:03
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: coreos#739
Signed-off-by: Colin Walters <walters@verbum.org>
@travier travier mentioned this pull request Oct 4, 2024
41 tasks
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jmarrero jmarrero merged commit b0e17ab into coreos:main Oct 4, 2024
12 checks passed
@travier travier deleted the main-option-pttype branch October 7, 2024 10:22
HuijingHei added a commit to HuijingHei/bootupd that referenced this pull request Oct 10, 2024
This is to include coreos#740.
@HuijingHei HuijingHei mentioned this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bootupd: thread 'main' panicked at src/bios.rs:116:62
3 participants