]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libufs/sbread.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libufs / sbread.3
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
32 The
33 .Fn sbread
34 and
35 .Fn sbwrite
36 functions provide superblock reads and writes for
37 .Xr libufs 3
38 consumers.
39 The
40 .Fn sbread
41 and
42 .Fn sbwrite
43 functions operate on the superblock field,
44 .Va d_sb ,
45 associated with a given userland UFS disk structure.
46 Additionally, the
47 .Fn sbwrite
48 function will write to all superblock locations if the
49 .Fa all
50 value is non-zero.
51 .Sh RETURN VALUES
52 .Rv -std sbread sbwrite
53 .Sh ERRORS
54 The function
55 .Fn sbread
56 may fail and set
57 .Va errno
58 for any of the errors specified for the library function
59 .Xr bread 3 .
60 Additionally, it may follow the
61 .Xr libufs 3
62 error methodologies in situations where no usable superblock could be
63 found.
64 .Pp
65 The function
66 .Fn sbwrite
67 may fail and set
68 .Va errno
69 for 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
76 These functions first appeared as part of
77 .Xr libufs 3
78 in
79 .Fx 5.0 .
80 .Sh AUTHORS
81 .An Juli Mallett Aq jmallett@FreeBSD.org