summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-04-06 16:25:31 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-04-06 16:25:31 +0200
commit78a02453f8da25a0f29bf486ee4f41f12a7f7495 (patch)
tree6422cfd83880fa8e46a4a9e45994f09744716699 /dev/kernel
parent2998c211a523673dcf50ad3f6973996f89fc7e5b (diff)
fs/nefs: Optimize ::Format method for EPM inside NeFileSystemParser.
TL;DR: - Avoiding unecessary delays, when copying filesystem name to part block (EPM) Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel')
-rw-r--r--dev/kernel/src/FS/NeFS.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/dev/kernel/src/FS/NeFS.cc b/dev/kernel/src/FS/NeFS.cc
index 90c5995a..85e2cd6e 100644
--- a/dev/kernel/src/FS/NeFS.cc
+++ b/dev/kernel/src/FS/NeFS.cc
@@ -505,12 +505,11 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L
constexpr auto kFsName = "NeFS";
constexpr auto kBlockName = "NeKernel:";
- rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kFsName)), epm_boot->Fs, rt_string_len(kFsName));
-
epm_boot->FsVersion = kNeFSVersionInteger;
epm_boot->LbaStart = start;
epm_boot->SectorSz = kNeFSSectorSz;
+ rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kFsName)), epm_boot->Fs, rt_string_len(kFsName));
rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kBlockName)), epm_boot->Name, rt_string_len(kBlockName));
rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), epm_boot->Magic, rt_string_len(kEPMMagic));