2003-06-09 09:59:11 +00:00
|
|
|
.\" Author: Juli Mallett <jmallett@FreeBSD.org>
|
|
|
|
.\" Date: June 04, 2003
|
|
|
|
.\" Description:
|
|
|
|
.\" Manual page for libufs functions:
|
|
|
|
.\" sbread(3)
|
|
|
|
.\" sbwrite(3)
|
|
|
|
.\"
|
2003-06-10 18:24:40 +00:00
|
|
|
.\" This file is in the public domain.
|
|
|
|
.\"
|
2003-06-09 09:59:11 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2004-07-02 18:00:03 +00:00
|
|
|
.Dd June 4, 2003
|
2003-06-09 09:59:11 +00:00
|
|
|
.Dt SBREAD 3
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm sbread , sbwrite
|
2004-07-05 06:53:34 +00:00
|
|
|
.Nd read and write superblocks of a UFS file system
|
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
|
|
|
|
.Ft int
|
|
|
|
.Fn sbread "struct uufsd *disk"
|
|
|
|
.Ft int
|
|
|
|
.Fn sbwrite "struct uufsd *disk" "int all"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Fn sbread
|
|
|
|
and
|
|
|
|
.Fn sbwrite
|
|
|
|
functions provide superblock reads and writes for
|
|
|
|
.Xr libufs 3
|
|
|
|
consumers.
|
|
|
|
The
|
|
|
|
.Fn sbread
|
|
|
|
and
|
|
|
|
.Fn sbwrite
|
|
|
|
functions operate on the superblock field,
|
2004-07-05 06:53:34 +00:00
|
|
|
.Va d_sb ,
|
2003-06-09 09:59:11 +00:00
|
|
|
associated with a given userland UFS disk structure.
|
|
|
|
Additionally, the
|
|
|
|
.Fn sbwrite
|
|
|
|
function will write to all superblock locations if the
|
|
|
|
.Fa all
|
|
|
|
value is non-zero.
|
2004-07-05 06:53:34 +00:00
|
|
|
.Sh RETURN VALUES
|
|
|
|
.Rv -std sbread sbwrite
|
2003-06-09 09:59:11 +00:00
|
|
|
.Sh ERRORS
|
|
|
|
The function
|
|
|
|
.Fn sbread
|
|
|
|
may fail and set
|
|
|
|
.Va errno
|
|
|
|
for any of the errors specified for the library function
|
|
|
|
.Xr bread 3 .
|
|
|
|
Additionally, it may follow the
|
|
|
|
.Xr libufs 3
|
|
|
|
error methodologies in situations where no usable superblock could be
|
|
|
|
found.
|
|
|
|
.Pp
|
|
|
|
The function
|
|
|
|
.Fn sbwrite
|
|
|
|
may fail and set
|
|
|
|
.Va errno
|
|
|
|
for any of the errors specified for the library function
|
|
|
|
.Xr bwrite 3 .
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr bread 3 ,
|
|
|
|
.Xr bwrite 3 ,
|
|
|
|
.Xr libufs 3
|
|
|
|
.Sh HISTORY
|
|
|
|
These functions first appeared as part of
|
|
|
|
.Xr libufs 3
|
|
|
|
in
|
|
|
|
.Fx 5.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Juli Mallett Aq jmallett@FreeBSD.org
|