aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-03-17 15:54:08 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-03-17 15:54:08 +0100
commitef3ed7d196fc5f858ec5ff53c02f135ad1824552 (patch)
tree629a82d48ae4fa372521ad6e8cfda7573293d7b5
parent86684bfb488e655d4e1cc5d214b529d9f4d44086 (diff)
copy formatted data partition back into the image
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 5b413b1..7470d91 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -616,6 +616,10 @@ fn format_ext4(partition: &mut StreamSlice<File>) -> anyhow::Result<()> {
bail!("mkfs.ext4 failed");
}
+ tmp_file.rewind()?;
+ partition.rewind()?;
+ io::copy(&mut tmp_file, partition)?;
+
println!("Data filesystem created successfully");
Ok(())
}