1 #ifndef __LUNAIX_DEVICE_H
2 #define __LUNAIX_DEVICE_H
4 #define DEVICE_NAME_SIZE 32
6 #include <lunaix/ds/hstr.h>
7 #include <lunaix/ds/llist.h>
9 typedef unsigned int dev_t;
13 struct llist_header dev_list;
14 struct device* parent;
17 char name_val[DEVICE_NAME_SIZE];
20 int (*read)(struct device* dev, void* buf, size_t offset, size_t len);
21 int (*write)(struct device* dev, void* buf, size_t offset, size_t len);
28 device_addseq(struct device* parent, void* underlay, char* name_fmt, ...);
31 device_addvol(struct device* parent, void* underlay, char* name_fmt, ...);
34 device_remove(struct device* dev);
36 #endif /* __LUNAIX_DEVICE_H */