dmesgfs is another example file system, which displays the device tree
information gained from dmesg(8) as a directory hierarchy. The information
can be displayed in files, or as targets of symbolic links.
% l /mnt/mainbus0
total 320
drwxr-xr-x 2 agc agc 512 May 21 22:21 .
drwxr-xr-x 2 root wheel 0 Jan 1 1970 ..
drwxr-xr-x 2 agc agc 512 May 21 22:21 acpi0
lrwxr-xr-x 1 agc agc 41 May 21 22:21 cpu0 -> cpu0 at mainbus0 apid 0: (boot processor)
lrwxr-xr-x 1 agc agc 40 May 21 22:21 ioapic -> ioapic at mainbus0 apid 1 not configured
drwxr-xr-x 2 agc agc 512 May 21 22:21 pci0
% l /mnt/mainbus0/pci0/piixide0/atabus1/atapibus0
total 256
drwxr-xr-x 2 agc agc 512 May 21 22:21 .
drwxr-xr-x 2 agc agc 512 May 21 22:21 ..
lrwxr-xr-x 1 agc agc 31 May 21 22:21 Description -> atapibus0 at atabus1: 2 targets
lrwxr-xr-x 1 agc agc 104 May 21 22:21 cd0 -> cd0 at atapibus0 drive 0: <VMware Virtual IDE CDROM Drive, 1000000000000000000, 0000000> cdrom removable
%
Introduce a parameter -r to control the root node type. For example
"dtfs -r 'lnk /etc' /puffs" mounts dtfs with the root node as a
symbolic link to /etc:
jojonaru# ./dtfs -r 'lnk /etc' /puffs
jojonaru# ls -l /puffs
lrw-rw-rw- 1 root wheel 4 May 17 14:06 /puffs -> /etc
jojonaru# cd /puffs
jojonaru# pwd
/etc
jojonaru#
Extra credit for figuring out how to unmount this file system with
umount(8).
Likewise, "dtfs -r 'chr 2 12' /puffs" makes /puffs (i386) /dev/zero etcetc.
intermediate directories have already been created. If not, then
create the intermediate directories. This means that callers don't
need to create the intermediate directories themselves.
When reading a virtual directory, don't return a zero-length
virtual directory entry.
mp3-based files according to artist, genre or year.
Three virtual directories are made available under the mount point -
artists/
genre/
year/
and then virtual directory entries (see virtdir(3)) are created under
these heading directories.
The pkgsrc/audio/id3 package is needed for this file system to function
properly.
Two shell scripts, id3info.sh and id3db.sh, are included to build up
the music database for id3fs to use to build up its virtual
directories.
librefuse-based file systems.
These are especially useful for file systems which present virtual
directory hierarchies to the caller.
The routines build up and manage an array of virtual directory
entries, indexed upon full pathname within the file system. This is
analogous to the way refuse indexes its own entries. Routines are
available to add, delete, and find entries. Each entry can be one of
3 types - file ('f'), directory ('d') or symbolic link ('l'). Each
entry can also be associated with a target, which is a character
string allocated upon addition. This can be useful for virtual
directory entries of the symbolic link type.
The virtual directory entries can be traversed as an ordered list
(the entries are ordered alphabetically), or can be accessed by
directory component, using routines analogous to opendir(3), readdir(3),
and closedir(3).
only take the bare essentials, which currently means removing
"maxreqlen" from the argument list (all current callers I'm aware
of set it as 0 anyway). Introduce puffs_init(), which provides a
context for setting various parameters and puffs_domount(), which
can be used to mount the file system. Keep puffs_mount() as a
shortcut for the above two for simple file systems.
Bump development ABI version to 13. After all, it's Friday the 13th.
Watch out! Bad things can happen on Friday the 13th. --No carrier--
accessors for interesting data in it. Namely, you can now get
pu->pu_privdata with puffs_getspecific(), pu->pu_pn_root with
puffs_set/getroot() and pu->pu_maxreqlen with puffs_getmaxreqlen().
the BSD world as a "union" file system.
This fanout file system takes a number of directories and makes them
available under a single mount point.
This is more of an example file sytsem than anything else, but is used
as the basis of a number of other file systems which will be forthcoming
"real soon now".
hierarchy in the in-memory nodes. This allows us to easily do
reclaim, since we don't have to worry about reclaiming a node which
has alive children which might want to dotdot lookup later on.