TINYFS(3)                                               TINYFS(3)

     NAME
          tinyfs - file system for miniscule devices

     SYNOPSIS
          sys->bind("#Ffd", "/nvfs", Sys->MAFTER|Sys->MCREATE);

     DESCRIPTION
          Tinyfs provides file system access to the contents of low-
          capacity devices, ranging from several hundred bytes (at
          least 144 bytes) to at most the order of a kilobyte.  It is
          provided to support file system access to small non-volatile
          memories, as for instance are found in some real-time clock
          chips, where IDs, keys, PINs, certificates and the like
          might be stored by either client or server.

          The file system has only one directory, its root, which can
          contain only files.  Once created, a write can only append
          to a file; random updates are not allowed, although the file
          could be truncated and rewritten.

          A tiny file system cannot be bound straightforwardly to a
          mount point by bind(1). Instead sys-bind(2) must be used, in
          an unusual way: the device specifier following the #F device
          name is an integer file descriptor fd, which must correspond
          to a file open for reading and writing (ie, sys-open(2) mode
          ORDWR), on which the tiny file system will live.  The device
          must allow seek and write.  During the attach, the system
          scans the device, checking the file system structure by
          building a table of files, and checking a checksum stored in
          each block; inconsistent structure is reinitialised, and
          thus a previously unused device will emerge correctly for-
          matted as an empty tiny file system.

     FILES
          /nvfs  conventional mount point used by init(8)

     SOURCE
          /os/port/devtinyfs.c

     BUGS
          ``A pity the code isn't also tiny.''

     Page 1                       Plan 9            (printed 12/21/24)