aboutsummaryrefslogtreecommitdiff
path: root/src/common/include/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/include/fs.h')
-rw-r--r--src/common/include/fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/include/fs.h b/src/common/include/fs.h
index 431c16f..5a2fc84 100644
--- a/src/common/include/fs.h
+++ b/src/common/include/fs.h
@@ -3,6 +3,8 @@
#include <stdint.h>
#include <stddef.h>
+typedef int fd_t;
+
#define FT_REGULAR 0 // no flags = regular file
#define FT_DIR (0x01)
#define FT_DEV (0x02)
@@ -28,6 +30,7 @@
#define FM_ALL_MODES (0xFFFF)
+
typedef struct {
int type;
int access;
@@ -46,4 +49,14 @@ typedef struct {
#define IOCTL_BLOCKDEV_GET_BLOCK_SIZE 40
#define IOCTL_BLOCKDEV_GET_BLOCK_COUNT 41
+
+#define SEL_READ 0x01
+#define SEL_WRITE 0x02
+#define SEL_ERROR 0x04
+
+typedef struct {
+ fd_t fd;
+ uint16_t req_flags, got_flags; // rq_flags : what caller is interested in
+} sel_fd_t;
+
/* vim: set ts=4 sw=4 tw=0 noet :*/