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

sysroot: Detect early on when /boot is on vfat #3405

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Member

We do want to support this (as part of supporing the Boot Loader Spec) but because we use symlinks in /boot, can't yet.

Error out very early on consistently if we detect
vfat for /boot, but also add a member variable to keep track of this in preparation for supporting it.

We do want to support this (as part of supporing the
Boot Loader Spec) but because we use symlinks in `/boot`,
can't yet.

Error out very early on consistently if we detect
vfat for /boot, but also add a member variable to keep track
of this in preparation for supporting it.
@cgwalters cgwalters requested a review from Copilot April 6, 2025 21:26
@cgwalters
Copy link
Member Author

cc @igoropaniuk - can you review this?

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • tests/kolainst/nondestructive/itest-alt-sysroot.sh: Language not supported
Comments suppressed due to low confidence (1)

src/libostree/ostree-sysroot.c:352

  • The error message from glnx_throw_errno_prefix is simply "fstatfs"; consider adding more contextual information (e.g. noting the failure occurred while checking the boot partition) to make debugging easier.
if (fstatfs (self->boot_fd, &stbuf) < 0)

Comment on lines +2221 to 2222
g_assert (!sysroot->boot_is_vfat);

Copy link
Preview

Copilot AI Apr 6, 2025

Choose a reason for hiding this comment

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

Using g_assert to enforce that boot_is_vfat is false may not be sufficient for production, as asserts can be disabled. Consider replacing the assertion with explicit error handling to ensure consistent behavior in all builds.

Suggested change
g_assert (!sysroot->boot_is_vfat);
if (sysroot->boot_is_vfat)
return glnx_throw (error, "boot_is_vfat must be false");

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

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.

1 participant