Rework the ioctl() syscall, clean up arguments
This commit is contained in:
@ -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_
|
||||
|
Reference in New Issue
Block a user