LIBUFS(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

okay so bestie, this is LIBUFS(3) from the Library Functions Manual, and it's giving iconic userland UFS energy. πŸ’…

✨ NAME ✨

libufs β€” operate on UFS file systems from userland. periodt. 🫢

πŸŽ€ LIBRARY πŸŽ€

Library: UFS File System Access Library (libufs, -lufs). yes bestie, that's the one. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <sys/param.h>
#include <sys/mount.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <libufs.h>

🌸 DESCRIPTION 🌸

The libufs library and the functions it provides are used for implementing utilities which need to access a UFS file system at a low level from userland. lowkey iconic behavior, no cap. Facilities provided are used to implement utilities such as newfs(8) and dumpfs(8). The libufs library is designed to be simple, and to provide functions that are traditionally useful to have. 🫢

A disk is represented as the type struct uufsd as defined in <libufs.h>. The structure is filled out, operations are performed, and the disk is closed. so the flow is literally: fill it out, do the operations, close the disk. slay. ✨

πŸ’€ ERRORS πŸ’€

Functions provided by libufs return -1 in every functional error situation. They also set the d_error field of struct uufsd to a string describing the error. so if something goes off, bestie, that d_error string is literally telling you what happened. 😭

🌈 SEE ALSO 🌈

go read these, bestie, they're all part of the era:

πŸ‘‘ HISTORY πŸ‘‘

The libufs(3) library first appeared in FreeBSD 5.0. iconic behavior. ✨

πŸ’œ AUTHORS πŸ’œ

  • Juli Mallett <jmallett@FreeBSD.org>
  • Marshall Kirk McKusick <mckusick@FreeBSD.org>

Additional design, feedback, and ideas were provided by Poul-Henning Kamp <phk@FreeBSD.org>.


and that's the page, bestie! source/version: Debian, dated September 2, 2020 β€” LIBUFS(3) out. πŸ’–

πŸ“¦ where this page comes from