Skip to content

Commit b3e35c4

Browse files
committed
install: Track is_alongside
We're going to need to dispatch other behavior on this around the bootloader, so make it a generic thing. Signed-off-by: Colin Walters <[email protected]>
1 parent b9b311f commit b3e35c4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/src/install.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ pub(crate) struct RootSetup {
632632
rootfs: Utf8PathBuf,
633633
rootfs_fd: Dir,
634634
rootfs_uuid: Option<String>,
635-
/// If true, do not try to remount the root read-only and flush the journal, etc.
636-
skip_finalize: bool,
635+
/// True if this is an "alongside" install where we didn't create the filesystem
636+
is_alongside: bool,
637637
boot: Option<MountSpec>,
638638
kargs: Vec<String>,
639639
}
@@ -882,7 +882,7 @@ async fn install_to_filesystem_impl(state: &State, rootfs: &mut RootSetup) -> Re
882882
.run()?;
883883

884884
// Finalize mounted filesystems
885-
if !rootfs.skip_finalize {
885+
if !rootfs.is_alongside {
886886
let bootfs = rootfs.rootfs.join("boot");
887887
for fs in [bootfs.as_path(), rootfs.rootfs.as_path()] {
888888
finalize_filesystem(fs)?;
@@ -1112,7 +1112,7 @@ pub(crate) async fn install_to_filesystem(opts: InstallToFilesystemOpts) -> Resu
11121112
rootfs_uuid: inspect.uuid.clone(),
11131113
boot,
11141114
kargs,
1115-
skip_finalize: matches!(fsopts.replace, Some(ReplaceMode::Alongside)),
1115+
is_alongside: matches!(fsopts.replace, Some(ReplaceMode::Alongside)),
11161116
};
11171117

11181118
install_to_filesystem_impl(&state, &mut rootfs).await?;

lib/src/install/baseline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,6 @@ pub(crate) fn install_create_rootfs(
387387
rootfs_uuid: Some(root_uuid.to_string()),
388388
boot: Some(boot),
389389
kargs,
390-
skip_finalize: false,
390+
is_alongside: false,
391391
})
392392
}

0 commit comments

Comments
 (0)