diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-29 08:57:14 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-29 08:57:14 +0200 |
| commit | 72c8b50c0ccb40f32adea25011447e919a48afeb (patch) | |
| tree | 7be8a1823bb81eb19fb35fc85e299ca0969b90db /tooling | |
| parent | aa50b4980a84128fed32139758a00e215ee54a78 (diff) | |
tooling: update mkfs.hefs according to new implementation.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'tooling')
| -rw-r--r-- | tooling/mkfs.hefs.cc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tooling/mkfs.hefs.cc b/tooling/mkfs.hefs.cc index 3147a6e6..356504f9 100644 --- a/tooling/mkfs.hefs.cc +++ b/tooling/mkfs.hefs.cc @@ -112,50 +112,6 @@ int main(int argc, char** argv) { filesystem.seekp(bootNode.startIND); - auto cnt = end_ind / sizeof(mkfs::hefs::IndexNodeDirectory); - - auto start = bootNode.startIND; - auto prev = start; - - // Pre-allocate index node directory tree - for (size_t i = 0; i < cnt; ++i) { - mkfs::hefs::IndexNodeDirectory indexNode{}; - - std::memcpy(indexNode.name, u8"/", std::u8string(u8"/").size() * sizeof(char16_t)); - - indexNode.flags = mkfs::hefs::kHeFSEncodingUTF8; - indexNode.kind = mkfs::hefs::kHeFSFileKindDirectory; - indexNode.deleted = mkfs::hefs::kHeFSTimeMax; - - indexNode.entryCount = 1; - - indexNode.checksum = 0; - indexNode.indexNodeChecksum = 0; - - indexNode.uid = 0; - indexNode.gid = 0; - indexNode.mode = 0; - indexNode.color = mkfs::hefs::kHeFSBlack; - - indexNode.parent = bootNode.startIND; - indexNode.child = bootNode.endIND; - - indexNode.next = start + sizeof(mkfs::hefs::IndexNodeDirectory); - indexNode.prev = prev; - - prev = start; - start += sizeof(mkfs::hefs::IndexNodeDirectory); - - filesystem.write(reinterpret_cast<const char*>(&indexNode), - sizeof(mkfs::hefs::IndexNodeDirectory)); - - if (!filesystem.good()) { - std::cerr << "mkfs.hefs: Error: Unable to write index node to output_device " << output_device - << std::endl; - return EXIT_FAILURE; - } - } - filesystem.flush(); filesystem.close(); |
