summaryrefslogtreecommitdiffhomepage
path: root/SDK
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-06-01 23:59:03 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-06-01 23:59:03 +0200
commit5bc5e4de0d4dcfc52c192315ca5c59a066d678d8 (patch)
tree0de48d9d3645b0cd6857b84629d0adbcd353a521 /SDK
parentfc0d38259fd6670966b916b1f28a11f3cb2a4c45 (diff)
MHR-23: Fix ACPI and APIC probe.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'SDK')
-rw-r--r--SDK/Libraries/CoreSystem/Headers/File.h5
-rw-r--r--SDK/Libraries/CoreSystem/Sources/File.c13
2 files changed, 17 insertions, 1 deletions
diff --git a/SDK/Libraries/CoreSystem/Headers/File.h b/SDK/Libraries/CoreSystem/Headers/File.h
index 0013b074..cfd9ee30 100644
--- a/SDK/Libraries/CoreSystem/Headers/File.h
+++ b/SDK/Libraries/CoreSystem/Headers/File.h
@@ -49,4 +49,9 @@ CS_EXTERN_C FSForkRef CSGetFork(FSRef refCS, const CharacterTypeUTF8* forkName);
/// @return if not return false, or true.
CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path);
+/// @brief Flush file
+/// @param refCS the file reference.
+/// @return
+CS_EXTERN_C VoidType CSFlushFile(FSRef refCS);
+
/// END OF FILE
diff --git a/SDK/Libraries/CoreSystem/Sources/File.c b/SDK/Libraries/CoreSystem/Sources/File.c
index 7547e7f2..6e0e810a 100644
--- a/SDK/Libraries/CoreSystem/Sources/File.c
+++ b/SDK/Libraries/CoreSystem/Sources/File.c
@@ -38,10 +38,21 @@ CS_EXTERN_C VoidType CSCloseFile(FSRef refCS)
{
CS_MUST_PASS(kSharedApplication);
- kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile);
+ CSFlushFile(refCS);
+
kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS);
}
+/// @brief Flush file
+/// @param refCS the file reference.
+/// @return
+CS_EXTERN_C VoidType CSFlushFile(FSRef refCS)
+{
+ CS_MUST_PASS(kSharedApplication);
+
+ kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile);
+}
+
/// @brief Check if filesystem path is valid.
/// @param path
/// @return