summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-30 07:18:30 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-30 07:18:30 -0500
commitba3cd2194412914936c1c00efe87391d0615cd17 (patch)
tree083a31113d597c1fca1350a4943ae43815ef2248 /tools
parent73fa1d46dc88bb74626715b491fafd57591aeab8 (diff)
chore: mkfs.hefs: pad until end of kDiskSize.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/mkfs.hefs.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/mkfs.hefs.cc b/tools/mkfs.hefs.cc
index 6cf71bd1..0f11142b 100644
--- a/tools/mkfs.hefs.cc
+++ b/tools/mkfs.hefs.cc
@@ -171,6 +171,7 @@ int main(int argc, char** argv) {
boot_node.volumeName[label_units] = 0U;
output_device.seekp(static_cast<std::streamoff>(start_ind));
+
if (!output_device.good()) {
mkfs::console_out() << "hefs: error: Failed seek to index start.\n";
return EXIT_FAILURE;
@@ -189,7 +190,10 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
+ output_device.seekp(static_cast<std::streamoff>(kDiskSize - 1));
+ output_device.put(0);
output_device.flush();
+
output_device.close();
mkfs::console_out() << "hefs: info: Wrote filesystem to output device: " << output_path << "\n";