Rework the ioctl() syscall, clean up arguments

This commit is contained in:
2025-09-09 18:12:33 +02:00
parent 1029db6342
commit ac195acd2f
6 changed files with 38 additions and 77 deletions

View File

@ -4,10 +4,11 @@
#include <stdint.h>
#include <stddef.h>
int32_t ioctl(uint64_t ioh, uint64_t cmd, void *extra);
int32_t ioctl_openfile(const char *path, uint64_t flags);
int32_t ioctl_writefile(int32_t ioh, const uint8_t *const buffer, size_t len, size_t off);
int32_t ioctl_readfile(int32_t ioh, uint8_t *const buffer, size_t len, size_t off);
int32_t ioctl_closefile(int32_t ioh);
#define IOCTL_PATH(p) ((uint64_t)(p))
#define IOCTL_BUF(b) ((uint64_t)(b))
#define IOCTL_SIZE(sz) ((uint64_t)(sz))
#define IOCTL_OFF(off) ((uint64_t)(off))
int32_t ioctl(uint64_t ioh, uint64_t cmd, uint64_t arg1, uint64_t arg2, uint64_t arg3);
#endif // ULIB_SYSTEM_IOCTL_H_