1.\" Author: Juli Mallett <jmallett@FreeBSD.org> 2.\" Date: June 04, 2003 3.\" Description: 4.\" Manual page for libufs functions: 5.\" sbread(3) 6.\" sbwrite(3) 7.\" 8.\" This file is in the public domain. 9.\" 10.\" $FreeBSD$ 11.\" 12.Dd June 4, 2003 13.Dt SBREAD 3 14.Os 15.Sh NAME 16.Nm sbread , sbwrite 17.Nd read and write superblocks of a UFS file system 18.Sh LIBRARY 19.Lb libufs 20.Sh SYNOPSIS 21.In sys/param.h 22.In sys/mount.h 23.In ufs/ufs/ufsmount.h 24.In ufs/ufs/dinode.h 25.In ufs/ffs/fs.h 26.In libufs.h 27.Ft int 28.Fn sbread "struct uufsd *disk" 29.Ft int 30.Fn sbwrite "struct uufsd *disk" "int all" 31.Sh DESCRIPTION 32The 33.Fn sbread 34and 35.Fn sbwrite 36functions provide superblock reads and writes for 37.Xr libufs 3 38consumers. 39The 40.Fn sbread 41and 42.Fn sbwrite 43functions operate on the superblock field, 44.Va d_sb , 45associated with a given userland UFS disk structure. 46Additionally, the 47.Fn sbwrite 48function will write to all superblock locations if the 49.Fa all 50value is non-zero. 51.Sh RETURN VALUES 52.Rv -std sbread sbwrite 53.Sh ERRORS 54The function 55.Fn sbread 56may fail and set 57.Va errno 58for any of the errors specified for the library function 59.Xr bread 3 . 60Additionally, it may follow the 61.Xr libufs 3 62error methodologies in situations where no usable superblock could be 63found. 64.Pp 65The function 66.Fn sbwrite 67may fail and set 68.Va errno 69for any of the errors specified for the library function 70.Xr bwrite 3 . 71.Sh SEE ALSO 72.Xr bread 3 , 73.Xr bwrite 3 , 74.Xr libufs 3 75.Sh HISTORY 76These functions first appeared as part of 77.Xr libufs 3 78in 79.Fx 5.0 . 80.Sh AUTHORS 81.An Juli Mallett Aq Mt jmallett@FreeBSD.org 82