From ba3cd2194412914936c1c00efe87391d0615cd17 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 30 Nov 2025 07:18:30 -0500 Subject: chore: mkfs.hefs: pad until end of kDiskSize. Signed-off-by: Amlal El Mahrouss --- tools/mkfs.hefs.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools') 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(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(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"; -- cgit v1.2.3