diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-30 07:48:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-30 07:48:43 -0500 |
| commit | 82f7d186848681e2530c9fa8b196b55fad0f4823 (patch) | |
| tree | 083a31113d597c1fca1350a4943ae43815ef2248 | |
| parent | 0ea04985716deb9bff4a83e08e984513f6664b91 (diff) | |
| parent | ba3cd2194412914936c1c00efe87391d0615cd17 (diff) | |
Merge pull request #97 from nekernel-org/develop
chore: mkfs.hefs: pad until end of kDiskSize.
| -rw-r--r-- | tools/mkfs.hefs.cc | 4 |
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"; |
