summaryrefslogtreecommitdiffhomepage
path: root/Public/Developer/SystemLib/Sources/File.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-05 21:10:18 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-05 21:10:18 +0200
commitf95d8bf159d10b5a9521dcaa0bc37aa0e9dfc02b (patch)
treebf8186f1a0521a64983bb0bca4f7b54883542195 /Public/Developer/SystemLib/Sources/File.c
parent5a903c1d8f80ca8d7bc5fbea0aea710ce0133f9d (diff)
MHR-23: Add run_format.sh, kernel patches.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Public/Developer/SystemLib/Sources/File.c')
-rw-r--r--Public/Developer/SystemLib/Sources/File.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/Public/Developer/SystemLib/Sources/File.c b/Public/Developer/SystemLib/Sources/File.c
index 6e4a7440..40cbd515 100644
--- a/Public/Developer/SystemLib/Sources/File.c
+++ b/Public/Developer/SystemLib/Sources/File.c
@@ -7,12 +7,13 @@
#include <Headers/Defines.h>
#include <Headers/File.h>
-enum FileOp {
- kFlushFile,
- kReadFork,
- kWriteFork,
- kOpenFork,
- kCloseFork,
+enum FileOp
+{
+ kFlushFile,
+ kReadFork,
+ kWriteFork,
+ kOpenFork,
+ kCloseFork,
};
/// @brief Opens a new file.
@@ -20,21 +21,23 @@ enum FileOp {
/// @param rest the restrict (rw, rwe, r+, w+, r, w)
/// @return FSRef the file.
CA_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path,
- const CharacterTypeUTF8* rest) {
- CA_MUST_PASS(kSharedApplication);
- CA_MUST_PASS(path && FsIsValidPath(path) == Yes);
- CA_MUST_PASS(rest);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path,
- rest);
+ const CharacterTypeUTF8* rest)
+{
+ CA_MUST_PASS(kSharedApplication);
+ CA_MUST_PASS(path && FsIsValidPath(path) == Yes);
+ CA_MUST_PASS(rest);
+
+ return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path,
+ rest);
}
/// @brief Closes the file and flushes it to the said file.
/// @param refFs the filesystem reference.
/// @return
-CA_EXTERN_C VoidType FsCloseFile(FSRef refFs) {
- CA_MUST_PASS(kSharedApplication);
+CA_EXTERN_C VoidType FsCloseFile(FSRef refFs)
+{
+ CA_MUST_PASS(kSharedApplication);
- kSharedApplication->Invoke(kSharedApplication, refFs, kFlushFile);
- kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refFs);
+ kSharedApplication->Invoke(kSharedApplication, refFs, kFlushFile);
+ kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refFs);
}