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
feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
fs
/
twifs.h
diff --git
a/lunaix-os/includes/lunaix/fs/twifs.h
b/lunaix-os/includes/lunaix/fs/twifs.h
index d77619e952291213245990a46617c9a7482d650f..50579aeed5d6eb580a3af755cfd98116eb785e62 100644
(file)
--- a/
lunaix-os/includes/lunaix/fs/twifs.h
+++ b/
lunaix-os/includes/lunaix/fs/twifs.h
@@
-59,4
+59,11
@@
twifs_rm_node(struct twifs_node* node);
struct twimap*
twifs_mapping(struct twifs_node* parent, void* data, const char* fmt, ...);
struct twimap*
twifs_mapping(struct twifs_node* parent, void* data, const char* fmt, ...);
+#define twimap_entry_simple(parent, name, data, read_cb) \
+ ({ \
+ struct twimap* map = twifs_mapping((parent), (data), (name)); \
+ map->read = (read_cb); \
+ map; \
+ })
+
#endif /* __LUNAIX_TWIFS_H */
#endif /* __LUNAIX_TWIFS_H */