Commit Graph

230 Commits

Author SHA1 Message Date
dsl
1f7faf40a2 Change the entry for ptmx to use the netbsd ptm driver.
Delete the entries for pts/nnn and add a note at the tope (next to the
ptmx info) about using ptyfs for the pts devices.
2007-07-05 19:34:36 +00:00
pooka
3c01554a05 dtfs -f for PUFFS_KFLAG_LOOKUP_FULLPNBUF 2007-07-01 22:59:09 +00:00
pooka
6596e0c995 adapt: **newnode etc. pointers -> struct puffs_newinfo 2007-07-01 18:40:15 +00:00
pooka
fe7bbdec69 adapt: pid -> const struct puffs_cid * 2007-07-01 17:23:44 +00:00
pooka
1776bc7796 adapt: pcn->pcn_cred is now a pointer 2007-07-01 15:32:02 +00:00
pooka
53a4105885 Actually, keep PUFFS_KFLAG_NOCACHE and -o cache around as shorthand
to neither page- nor namecache.
2007-06-24 22:25:49 +00:00
pooka
5662e7f720 PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.
2007-06-24 22:18:38 +00:00
pooka
3aa77bc919 Just to demonstrate namemod a bit further, make this flip the case
of filenames / contents instead of rot13 if -f is given.
2007-06-24 18:59:27 +00:00
pooka
39542808a8 cast tolower() arg to unsigned char 2007-06-24 18:57:26 +00:00
pooka
0d05db1c32 use puffs_null_setops() 2007-06-24 18:43:30 +00:00
pooka
a2b6c72725 fix this also, had a similar rototill-typo as rot13fs 2007-06-24 18:37:40 +00:00
pooka
eb83bd6c94 I wasn't going to add any more silly examples, but I'll bite for
this one, since it's a good exercise ..

Add icfs, which does the same thing as the refuse-based icfs agc
added earlier this week, i.e. null-mounts & converts the entire
namespace to lowercase.  However, it's a fun comparison, since this
is implemented in a completely different fashion from the refuse
version.
2007-06-24 18:32:00 +00:00
agc
a08d769680 Initial import of icfs, a case-insensitive/retentive file system.
This file system is based on librefuse and puffs.

	The icfs(8) utility can be used to mount an existing directory on a
	new mount point.  icfs makes use of the virtdir(3) virtual directory
	routines.  Underneath those virtual directories, the individual
	directory entries will be displayed as an exact mirror of the original
	directory, except that any capital letters in the original entry's
	name will be substituted with an entry name consisting entirely of
	lower-case letters.

This is an unusual example of a refuse-based file system which provides
lesser functionality than the file system it sits on.
2007-06-21 22:05:28 +00:00
agc
5599c23a3d Record the root directory at initialisation time.
Add a function to "normalise" a path to condense multiple repeated '/'
characters into one.
2007-06-21 21:59:32 +00:00
pooka
1c4b40e1bc fix typo from previous rototill, makes this work again 2007-06-20 21:11:26 +00:00
pooka
f8326bf98e Move puffs to a two clause license where it already isn't so. And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...
2007-06-06 01:54:59 +00:00
pooka
ae34899ec3 make getopt() actually accept -t also 2007-06-05 12:20:35 +00:00
agc
d49e2683be Another day, another file system.
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
%
2007-05-21 21:29:23 +00:00
agc
cfb41894f8 Adapt to new signature for virtdir_add(). 2007-05-21 21:19:25 +00:00
agc
12eda41239 Add a size parameter to virtdir_add, so that binary information can be
attached to a virtual directory entry.
2007-05-21 21:15:34 +00:00
agc
c048d63924 Add a function to return the virtual offset in the virtdir_t tree. 2007-05-19 06:15:38 +00:00
pooka
1d9d9332f5 Use SETBACK_NOREF instead of SETBACK_INACT to control node removal.
Avoids one round of inactive (wheee!).
2007-05-18 15:53:07 +00:00
pooka
48d5a49e1f "support" vop_poll enough for testing purposes. In short, yield every
poll request for a few seconds before returning.
2007-05-18 13:55:21 +00:00
pooka
c8b0a89198 reflect changes in fs mount: use puffs_mount() instead of
puffs_domount() & puffs_start()
2007-05-17 14:13:04 +00:00
pooka
9550017a8d Adapt to changes with mounting file systems.
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.
2007-05-17 14:10:13 +00:00
agc
cd3ccd9b12 Add a new, trivial file system, pcifs, which shows the devices on a
pcibus (via pcictl(8)) under the mount point:

% df /mnt
Filesystem         1K-blocks      Used     Avail Capacity  Mounted on
puffs:refuse:pcifs         0         0         0   100%    /mnt
% l /mnt
total 642
drwxr-xr-x   2 root  wheel     0 Jan  1  1970 .
drwxr-xr-x  31 root  wheel  1024 May 16 20:06 ..
lrw-r--r--   1 agc   agc      65 May 16 22:05 000:00:0: -> Intel 82443BX Host Bridge/Controller (host bridge, revision 0x01)
lrw-r--r--   1 agc   agc      55 May 16 22:05 000:01:0: -> Intel 82443BX AGP Interface (PCI bridge, revision 0x01)
lrw-r--r--   1 agc   agc      64 May 16 22:05 000:07:0: -> Intel 82371AB (PIIX4) PCI-ISA Bridge (ISA bridge, revision 0x08)
lrw-r--r--   1 agc   agc      86 May 16 22:05 000:07:1: -> Intel 82371AB (PIIX4) IDE controller (IDE mass storage, interface 0x8a, revision 0x01)
lrw-r--r--   1 agc   agc      58 May 16 22:05 000:07:2: -> Intel 82371AB (PIIX4) USB Host Controller (USB serial bus)
lrw-r--r--   1 agc   agc      87 May 16 22:05 000:07:3: -> Intel 82371AB (PIIX4) Power Management Controller (miscellaneous bridge, revision 0x08)
lrw-r--r--   1 agc   agc      36 May 16 22:05 000:15:0: -> VMware Virtual SVGA II (VGA display)
lrw-r--r--   1 agc   agc      56 May 16 22:05 000:16:0: -> Symbios Logic 53c1030 (SCSI mass storage, revision 0x01)
lrw-r--r--   1 agc   agc      75 May 16 22:05 000:17:0: -> Advanced Micro Devices PCnet-PCI Ethernet (ethernet network, revision 0x10)
lrw-r--r--   1 agc   agc      53 May 16 22:05 000:18:0: -> Ensoniq AudioPCI 97 (audio multimedia, revision 0x02)
%

pcifs uses the virtdir routines, librefuse and puffs.
2007-05-16 21:44:30 +00:00
pooka
d583f4a1ec Unmount frequently requires some test code, so define it here as
a dummy instead of libpuffs to make plugging the test code in easier.
2007-05-07 17:22:50 +00:00
pooka
2893a07834 Default to inactive-on-demand, use inactive setback to request inactive
to be called for a removed node (for unix open file semantics).
2007-05-07 17:18:50 +00:00
pooka
65b2578e0c allow to mount nullfs types only from directories
TODO: generalize
2007-04-24 21:38:32 +00:00
pooka
2878c03588 mount with write-through page cache if command line -t is given 2007-04-22 18:03:18 +00:00
pooka
9a3c4f612c remove assertion now done in libpuffs 2007-04-20 08:29:28 +00:00
agc
af7508ae15 Take advantage of the new functionality in virtdir_add() to create
intermediate directories automatically.
2007-04-18 20:33:59 +00:00
agc
9448d95472 When adding virtual directory entries, check the path to see that
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.
2007-04-18 20:32:16 +00:00
agc
41c7d6fedc Don't allow duplicate directory entries to be created.
Correct a comment.
2007-04-17 22:51:53 +00:00
pooka
66efb94d3b use PUFFS_STORE_DCOOKIE 2007-04-17 11:43:32 +00:00
pooka
558edb1195 update usage 2007-04-16 13:52:38 +00:00
pooka
4609dd7023 lessen file handle size sanity checks: kernel does it already (mostly) 2007-04-16 13:25:09 +00:00
pooka
b173dac692 adapt to kernel changes with file handles 2007-04-16 13:06:39 +00:00
agc
aac1680082 Add id3fs, a virtual file system, based on librefuse, for accessing
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.
2007-04-15 15:22:44 +00:00
agc
777436c8cf Add routines to manipulate virtual directory entries, for use with
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).
2007-04-15 15:10:56 +00:00
pooka
37dd7942fc Instead of keeping on adding parameters to puffs_mount(), make it
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--
2007-04-13 13:35:46 +00:00
pooka
95a18d20b9 Hide struct puffs_usermount from the rest of the world and provide
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().
2007-04-12 15:09:00 +00:00
pooka
7ed53cb9ec adapt to new readdir signature. no functional change 2007-04-11 21:10:49 +00:00
pooka
5af002af7d support nfs exporting sysctlfs. it is now possible to manage the
sysctl tree for a host over nfs (for however megaexciting that is)
2007-04-11 21:08:52 +00:00
pooka
3e65ff17b5 support nfs exporting dtfs 2007-04-11 21:07:54 +00:00
pooka
c6d7dea8d5 use dev_t from puffs_node instead of duplicating it into
fs specific structures
2007-04-10 13:32:02 +00:00
pooka
d99ec1ff38 g/c leftovers 2007-04-10 12:29:29 +00:00
pooka
4a480ffabb Allocate file memory in blocks instead of one big chunk. Makes
writing large files much cheaper since there's no longer a need to
realloc $lots of memory when the file grows.
2007-04-01 10:55:38 +00:00
agc
f44794b224 Add a refuse-based "fanout" file system. This is more commonly known in
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".
2007-03-31 21:05:56 +00:00
pooka
27eb6005d2 reflect libpuffs change of puffs_access argument unification 2007-03-22 16:59:34 +00:00