git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regression: mmap for fd
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
device.h
diff --git
a/lunaix-os/includes/lunaix/device.h
b/lunaix-os/includes/lunaix/device.h
index c456df41bc6c08b960d66667a091e7ee54e0e859..ee56b1da9d9a19592fa0274b5de5c733e87fea32 100644
(file)
--- a/
lunaix-os/includes/lunaix/device.h
+++ b/
lunaix-os/includes/lunaix/device.h
@@
-19,7
+19,7
@@
typedef unsigned int dev_t;
struct device
{
struct device
{
- u
int
32_t magic;
+ u32_t magic;
struct llist_header siblings;
struct llist_header children;
struct device* parent;
struct llist_header siblings;
struct llist_header children;
struct device* parent;
@@
-30,14
+30,16
@@
struct device
void* underlay;
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* underlay;
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);
- int (*exec_cmd)(struct device* dev, uint32_t req, va_list args);
+ int (*read_page)(struct device* dev, void* buf, size_t offset);
+ int (*write_page)(struct device* dev, void* buf, size_t offset);
+ int (*exec_cmd)(struct device* dev, u32_t req, va_list args);
};
struct device*
device_add(struct device* parent,
void* underlay,
char* name_fmt,
};
struct device*
device_add(struct device* parent,
void* underlay,
char* name_fmt,
- u
int
32_t type,
+ u32_t type,
va_list args);
struct device*
va_list args);
struct device*
@@
-64,4
+66,7
@@
device_getbyname(struct device* root_dev, const char* name, size_t len);
struct device*
device_getbyoffset(struct device* root_dev, int pos);
struct device*
device_getbyoffset(struct device* root_dev, int pos);
+void
+device_init_builtin();
+
#endif /* __LUNAIX_DEVICE_H */
#endif /* __LUNAIX_DEVICE_H */