2003-06-09 09:59:11 +00:00
|
|
|
.\" Author: Juli Mallett <jmallett@FreeBSD.org>
|
|
|
|
.\" Date: June 04, 2003
|
|
|
|
.\" Description:
|
|
|
|
.\" Manual page for libufs.
|
|
|
|
.\"
|
2003-06-10 18:24:40 +00:00
|
|
|
.\" This file is in the public domain.
|
|
|
|
.\"
|
2003-06-09 09:59:11 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2018-11-26 23:09:45 +00:00
|
|
|
.Dd November 26, 2018
|
2003-06-10 18:36:16 +00:00
|
|
|
.Dt LIBUFS 3
|
2003-06-09 09:59:11 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm libufs
|
2004-07-05 06:53:34 +00:00
|
|
|
.Nd operate on UFS file systems from userland
|
2003-06-09 09:59:11 +00:00
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libufs
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.In sys/param.h
|
|
|
|
.In sys/mount.h
|
|
|
|
.In ufs/ufs/ufsmount.h
|
|
|
|
.In ufs/ufs/dinode.h
|
|
|
|
.In ufs/ffs/fs.h
|
|
|
|
.In libufs.h
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
library and the functions it provides are used for implementing
|
2004-07-05 06:53:34 +00:00
|
|
|
utilities which need to access a UFS file system at a low level from
|
2003-06-09 09:59:11 +00:00
|
|
|
userland.
|
|
|
|
Facilities provided are used to implement utilities such as
|
|
|
|
.Xr newfs 8
|
|
|
|
and
|
|
|
|
.Xr dumpfs 8 .
|
|
|
|
The
|
|
|
|
.Nm
|
2003-06-10 18:36:16 +00:00
|
|
|
library is designed to be simple, and to provide functions that are
|
2003-06-09 09:59:11 +00:00
|
|
|
traditionally useful to have.
|
|
|
|
.Pp
|
|
|
|
A disk is represented as the type
|
2004-07-05 06:53:34 +00:00
|
|
|
.Vt "struct uufsd"
|
2003-06-09 09:59:11 +00:00
|
|
|
as defined in
|
2004-07-05 06:53:34 +00:00
|
|
|
.In libufs.h .
|
2003-06-09 09:59:11 +00:00
|
|
|
The structure is filled out, operations are performed, and the disk
|
|
|
|
is closed.
|
|
|
|
.Sh ERRORS
|
|
|
|
Functions provided by
|
2004-07-02 19:07:33 +00:00
|
|
|
.Nm
|
2004-07-05 06:53:34 +00:00
|
|
|
return \-1 in every functional error situation.
|
2003-06-09 09:59:11 +00:00
|
|
|
They also set the
|
2004-07-05 06:53:34 +00:00
|
|
|
.Va d_error
|
2003-06-10 18:36:16 +00:00
|
|
|
field of
|
2004-07-05 06:53:34 +00:00
|
|
|
.Vt "struct uufsd"
|
2003-06-10 18:36:16 +00:00
|
|
|
to a string describing the error.
|
2003-06-09 09:59:11 +00:00
|
|
|
.Sh SEE ALSO
|
2018-11-26 23:09:45 +00:00
|
|
|
.Xr berase 3 ,
|
2003-06-09 09:59:11 +00:00
|
|
|
.Xr bread 3 ,
|
|
|
|
.Xr bwrite 3 ,
|
2018-01-17 17:58:24 +00:00
|
|
|
.Xr cgget 3 ,
|
|
|
|
.Xr cgput 3 ,
|
2003-06-09 09:59:11 +00:00
|
|
|
.Xr cgread 3 ,
|
|
|
|
.Xr cgread1 3 ,
|
2018-01-17 17:58:24 +00:00
|
|
|
.Xr cgwrite 3 ,
|
2006-10-31 21:21:48 +00:00
|
|
|
.Xr cgwrite1 3 ,
|
2018-11-26 23:09:45 +00:00
|
|
|
.Xr getinode 3 ,
|
|
|
|
.Xr putinode 3 ,
|
|
|
|
.Xr sbget 3 ,
|
|
|
|
.Xr sbput 3 ,
|
2003-06-09 09:59:11 +00:00
|
|
|
.Xr sbread 3 ,
|
|
|
|
.Xr sbwrite 3 ,
|
|
|
|
.Xr ufs_disk_close 3 ,
|
|
|
|
.Xr ufs_disk_fillout 3 ,
|
|
|
|
.Xr ufs_disk_fillout_blank 3 ,
|
|
|
|
.Xr ufs_disk_write 3 ,
|
2004-07-04 20:55:50 +00:00
|
|
|
.Xr ffs 7
|
2003-06-09 09:59:11 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Xr libufs 3
|
|
|
|
library first appeared in
|
|
|
|
.Fx 5.0 .
|
|
|
|
.Sh AUTHORS
|
2014-06-23 08:23:05 +00:00
|
|
|
.An Juli Mallett Aq Mt jmallett@FreeBSD.org
|
2003-06-09 09:59:11 +00:00
|
|
|
.Pp
|
2004-07-05 06:53:34 +00:00
|
|
|
.An -nosplit
|
2003-06-09 09:59:11 +00:00
|
|
|
Additional design, feedback, and ideas were provided by
|
2014-06-23 08:23:05 +00:00
|
|
|
.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .
|