feat: ability to manipulate extended attribute
[lunaix-os.git] / lunaix-os / includes / lunaix / device.h
index 08d25c4a2776ee399e450951ce82efd582823485..414809a233aff8aa6d69c63eb8c8feb793456b42 100644 (file)
@@ -6,22 +6,19 @@
 #include <lunaix/ds/hstr.h>
 #include <lunaix/ds/llist.h>
 
+typedef unsigned int dev_t;
+
 struct device
 {
     struct llist_header dev_list;
     struct device* parent;
     struct hstr name;
+    dev_t dev_id;
     char name_val[DEVICE_NAME_SIZE];
     void* underlay;
     void* fs_node;
-    int (*read)(struct device* dev,
-                void* buf,
-                unsigned int offset,
-                unsigned int len);
-    int (*write)(struct device* dev,
-                 void* buf,
-                 unsigned int offset,
-                 unsigned int len);
+    int (*read)(struct device* dev, void* buf, size_t offset, size_t len);
+    int (*write)(struct device* dev, void* buf, size_t offset, size_t len);
 };
 
 void