From 5bc5e4de0d4dcfc52c192315ca5c59a066d678d8 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 1 Jun 2024 23:59:03 +0200 Subject: MHR-23: Fix ACPI and APIC probe. Signed-off-by: Amlal El Mahrouss --- SDK/Libraries/CoreSystem/Headers/File.h | 5 +++++ SDK/Libraries/CoreSystem/Sources/File.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'SDK/Libraries/CoreSystem') 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 -- cgit v1.2.3