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