diff options
Diffstat (limited to 'src/libSystem')
| -rw-r--r-- | src/libSystem/SystemKit/System.h | 4 | ||||
| -rw-r--r-- | src/libSystem/src/SystemCalls.cc | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libSystem/SystemKit/System.h b/src/libSystem/SystemKit/System.h index 4e3cc264..a8cf05f2 100644 --- a/src/libSystem/SystemKit/System.h +++ b/src/libSystem/SystemKit/System.h @@ -324,7 +324,9 @@ IMPORT_C SInt32 PrintIn(IORef file /* nullptr to direct to stdout */, const Char IMPORT_C IORef PrintCreate(Void); -IMPORT_C SInt32 PrintRelease(IORef); +IMPORT_C UInt64 PrintSize(IORef ref); + +IMPORT_C SInt32 PrintRelease(IORef ref); IMPORT_C IORef PrintGet(const Char* path); diff --git a/src/libSystem/src/SystemCalls.cc b/src/libSystem/src/SystemCalls.cc index 0059d55d..07f5241b 100644 --- a/src/libSystem/src/SystemCalls.cc +++ b/src/libSystem/src/SystemCalls.cc @@ -217,3 +217,8 @@ IMPORT_C SInt32 PrintOut(_Input IORef desc, const Char* fmt, ...) { return *ret; } + +IMPORT_C UInt64 PrintSize(IORef ref) { + MUST_PASS(ref); + return *static_cast<UInt64*>(libsys_syscall_arg_2(SYSCALL_HASH("PrintSize"), ref)); +}
\ No newline at end of file |
