summaryrefslogtreecommitdiff
path: root/fs/fd.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-19 01:52:14 +0200
committerMiguel <m.i@gmx.at>2018-09-19 01:52:14 +0200
commit1e08b64b43bf9c50b644da3f76d5a8bcc73f62da (patch)
tree53aca729b7faeb781b04b9c62a7b1b13efa21991 /fs/fd.h
parent2d91384197847a7e8fe2c3f548918a8277d3086d (diff)
addding sysfs and pipes etc
Diffstat (limited to 'fs/fd.h')
-rw-r--r--fs/fd.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/fd.h b/fs/fd.h
index 35e28d9..c9b7fd8 100644
--- a/fs/fd.h
+++ b/fs/fd.h
@@ -9,27 +9,12 @@
#include "fifo.h"
#include "ringbuffer.h"
-/*
-typedef struct
-{
- int(* seek)(int offset, int whence);
-
- int(* read)(char *buf, int len);
- int(* wrtie)(char *buf, int len);
-
- int(* close)();
- int(* stat)(void *buf);
-
- void *data; //opaque
-
-}file;
-*/
-
enum FD_TYPE{
FD_TYPE_FIFO_BUFFERED=1,
FD_TYPE_EXT2_FILE=2,
FD_TYPE_EXT2_DIR=3,
- FD_TYPE_SYSFS=4
+ FD_TYPE_SYSFS=4,
+ FD_TYPE_PIPE=5
};
typedef struct fd_struct
@@ -52,5 +37,6 @@ bool fd_close(fd*);
fd fd_from_fifo(fifo* f);
fd fd_from_path(char *path);
-fd fd_from_sysfs(void(*g)(ringbuffer *r,void (*f)(ringbuffer *r,char *fmt, ...)));
+fd fd_from_sysfs(void(*g)(ringbuffer *r,void (*f)(ringbuffer *r,char *fmt, ...)),void(*h)(uint32_t in));
+
#endif