IT lexicon › Infra & Ops › libtrivfs

libtrivfs

Infra & Ops På svenska → Updated: 2026-11-09

The Hurd library for the simplest kind of translator: one that only pretends to be a single file.

A Hurd translator is a program that answers file-system requests for a node. Implementing the whole file protocol by hand would be tedious, so the Hurd ships three helper libraries by level of ambition: libdiskfs for real on-disk file systems such as ext2fs, libnetfs for virtual directory trees, and libtrivfs for the trivial case — a node with no children.

With libtrivfs you essentially write the read and write handlers and get the rest of the protocol for free. Simple device-like files such as /dev/null and the random source are built that way. It is also the natural starting point for anyone trying to see why the Hurd crowd thinks "everything is a file" should apply to users' own programs, too.

← Back to the lexicon