1 #include <lunaix/foptions.h>
3 #include <lunaix/fs/twifs.h>
5 extern struct llist_header all_mnts;
8 __twimap_read_mounts(struct twimap* map)
11 struct v_mount* mnt = twimap_index(map, struct v_mount*);
12 size_t len = vfs_get_path(mnt->mnt_point, path, 511, 0);
14 twimap_printf(map, "%s at %s", mnt->super_block->fs->fs_name.value, path);
15 if ((mnt->flags & MNT_RO)) {
16 twimap_printf(map, ", ro");
18 twimap_printf(map, ", rw");
20 twimap_printf(map, "\n");
24 __twimap_gonext_mounts(struct twimap* map)
26 struct v_mount* mnt = twimap_index(map, struct v_mount*);
27 if (mnt->list.next == &all_mnts) {
30 map->index = container_of(mnt->list.next, struct v_mount, list);
35 __twimap_reset_mounts(struct twimap* map)
37 map->index = container_of(all_mnts.next, struct v_mount, list);
41 __twimap_read_version(struct twimap* map)
46 " (gnu-cc " __VERSION__ ") " __DATE__ " " __TIME__);
50 vfs_export_attributes()
52 twimap_export_list (NULL, mounts, FSACL_ugR, NULL);
53 twimap_export_value(NULL, version, FSACL_ugR, NULL);
55 EXPORT_TWIFS_PLUGIN(vfs_general, vfs_export_attributes);