From 72c8b50c0ccb40f32adea25011447e919a48afeb Mon Sep 17 00:00:00 2001 From: Amlal Date: Tue, 29 Apr 2025 08:57:14 +0200 Subject: tooling: update mkfs.hefs according to new implementation. Signed-off-by: Amlal --- tooling/mkfs.hefs.cc | 44 -------------------------------------------- 1 file changed, 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(&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(); -- cgit v1.2.3