feat: (device) dev_null and dev_rand support
[lunaix-os.git] / lunaix-os / kernel / fs / fs_export.c
index 13d65577fc62f9c9bf15af52d6db977f9f9e89e3..046204f026e556b5e4736433710df8362bc29e83 100644 (file)
@@ -37,6 +37,18 @@ __mount_reset(struct twimap* map)
     map->index = container_of(all_mnts.next, struct v_mount, list);
 }
 
+void
+__version_rd(struct twimap* map)
+{
+    twimap_printf(map,
+                  "LunaixOS version %s (%s-gnu-gcc %s) %s %s",
+                  LUNAIX_VER,
+                  PLATFORM_TARGET,
+                  __VERSION__,
+                  __DATE__,
+                  __TIME__);
+}
+
 void
 vfs_export_attributes()
 {
@@ -44,4 +56,7 @@ vfs_export_attributes()
     map->read = __mount_read;
     map->go_next = __mount_next;
     map->reset = __mount_reset;
+
+    map = twifs_mapping(NULL, NULL, "version");
+    map->read = __version_rd;
 }
\ No newline at end of file