1.\" Author: Juli Mallett <jmallett@FreeBSD.org> 2.\" Date: June 04, 2003 3.\" Description: 4.\" Manual page for libufs. 5.\" 6.\" This file is in the public domain. 7.\" 8.\" $FreeBSD$ 9.\" 10.Dd June 04, 2003 11.Dt LIBUFS 3 12.Os 13.Sh NAME 14.Nm libufs 15.Nd operate on UFS filesystems from userland 16.Sh LIBRARY 17.Lb libufs 18.Sh SYNOPSIS 19.In sys/types.h 20.In sys/param.h 21.In sys/mount.h 22.In ufs/ufs/ufsmount.h 23.In ufs/ufs/dinode.h 24.In ufs/ffs/fs.h 25.In libufs.h 26.Sh DESCRIPTION 27The 28.Nm 29library and the functions it provides are used for implementing 30utilities which need to access a UFS filesystem at a low level from 31userland. 32Facilities provided are used to implement utilities such as 33.Xr newfs 8 34and 35.Xr dumpfs 8 . 36The 37.Nm 38library is designed to be simple, and to provide functions that are 39traditionally useful to have. 40.Pp 41A disk is represented as the type 42.Dq struct uufsd 43as defined in 44.Pa libufs.h . 45The structure is filled out, operations are performed, and the disk 46is closed. 47.Sh ERRORS 48Functions provided by 49.Nm 50return -1 in every functional error situation. 51They also set the 52.Fa d_error 53field of 54.Dq struct uufsd 55to a string describing the error. 56.Sh SEE ALSO 57.Xr bread 3 , 58.Xr bwrite 3 , 59.Xr cgread 3 , 60.Xr cgread1 3 , 61.Xr sbread 3 , 62.Xr sbwrite 3 , 63.Xr ufs_disk_close 3 , 64.Xr ufs_disk_fillout 3 , 65.Xr ufs_disk_fillout_blank 3 , 66.Xr ufs_disk_write 3 , 67.Xr ffs 7 . 68.Sh HISTORY 69The 70.Xr libufs 3 71library first appeared in 72.Fx 5.0 . 73.Sh AUTHORS 74.An Juli Mallett Aq jmallett@FreeBSD.org 75.Pp 76Additional design, feedback, and ideas were provided by 77.An Poul-Henning Kamp Aq phk@FreeBSD.org . 78