41 lines
588 B
C
41 lines
588 B
C
#ifndef SHARE_SYSDEFS_IOCTL_H_
|
|
#define SHARE_SYSDEFS_IOCTL_H_
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#define IOCTL_NOHANDLE (-1)
|
|
|
|
enum {
|
|
IOCTL_OPENF = 0,
|
|
IOCTL_CLOSEF = 1,
|
|
IOCTL_READ = 2,
|
|
IOCTL_STAT = 3,
|
|
IOCTL_WRITE = 4,
|
|
};
|
|
|
|
enum {
|
|
IOCTL_F_READ = 1<<0,
|
|
IOCTL_F_WRITE = 1<<1,
|
|
IOCTL_F_MAKE = 1<<2,
|
|
};
|
|
|
|
typedef struct {
|
|
const char *path;
|
|
int32_t flags;
|
|
} IOCtlOF;
|
|
|
|
typedef struct {
|
|
const uint8_t *const buffer;
|
|
size_t len;
|
|
size_t off;
|
|
} IOCtlWF;
|
|
|
|
typedef struct {
|
|
uint8_t *const buffer;
|
|
size_t len;
|
|
size_t off;
|
|
} IOCtlRF;
|
|
|
|
#endif // SHARE_SYSDEFS_IOCTL_H_
|