mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-01-03 23:43:36 +01:00
core: add BFile_Size syscall
This commit is contained in:
parent
3147045196
commit
07e2de981a
2 changed files with 11 additions and 0 deletions
|
@ -52,6 +52,12 @@ int BFile_Open(uint16_t const *file, enum BFile_OpenMode mode);
|
|||
Returns a BFile error code. */
|
||||
int BFile_Close(int fd);
|
||||
|
||||
/* BFile_Size(): Retrieve size of an open file
|
||||
|
||||
@fd File descriptor
|
||||
Returns the file size in bytes, or a negative BFile error code*/
|
||||
int BFile_Size(int fd);
|
||||
|
||||
/* BFile_Write(): Write data to an open file
|
||||
Second and third argument specify the data and length to write.
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
.global _BFile_Create
|
||||
.global _BFile_Open
|
||||
.global _BFile_Close
|
||||
.global _BFile_Size
|
||||
.global _BFile_Write
|
||||
.global _BFile_Read
|
||||
|
||||
|
@ -71,6 +72,10 @@ _BFile_Open:
|
|||
_BFile_Close:
|
||||
syscall(0x042d)
|
||||
|
||||
# int BFile_Size(int handle)
|
||||
_BFile_Size:
|
||||
syscall(0x042f)
|
||||
|
||||
# int BFile_Write(int handle, const void *ram_buffer, int even_size)
|
||||
_BFile_Write:
|
||||
syscall(0x0435)
|
||||
|
|
Loading…
Reference in a new issue