Skip to content

Commit

Permalink
sysroot-deploy: Fix swap_bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 committed Dec 23, 2024
1 parent 979ac47 commit 594d873
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libostree/ostree-sysroot-deploy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,10 @@ swap_bootloader (OstreeSysroot *sysroot, OstreeBootloader *bootloader, int curre
* for whatever reason, and we wouldn't want to confuse the
* admin by going back to the previous session.
*/
if (fsync (sysroot->boot_fd) != 0)
glnx_autofd int boot_dir_fd = -1;
if (!glnx_opendirat (sysroot->boot_fd, ".", TRUE, &boot_dir_fd, error))
return FALSE;
if (fsync (boot_dir_fd) != 0)
return glnx_throw_errno_prefix (error, "fsync(boot)");

/* TODO: In the future also execute this automatically via a systemd unit
Expand Down

0 comments on commit 594d873

Please sign in to comment.