feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git] / lunaix-os / includes / lunaix / fs / twifs.h
index d77619e952291213245990a46617c9a7482d650f..50579aeed5d6eb580a3af755cfd98116eb785e62 100644 (file)
@@ -59,4 +59,11 @@ twifs_rm_node(struct twifs_node* node);
 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 */