]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libufs/cgread.3
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / lib / libufs / cgread.3
1 .\" Author:     Juli Mallett <jmallett@FreeBSD.org>
2 .\" Date:       June 04, 2003
3 .\" Description:
4 .\"     Manual page for libufs functions:
5 .\"             cgread(3)
6 .\"             cgread1(3)
7 .\"
8 .\" This file is in the public domain.
9 .\"
10 .\" $FreeBSD$
11 .\"
12 .Dd June 4, 2003
13 .Dt CGREAD 3
14 .Os
15 .Sh NAME
16 .Nm cgread , cgread1
17 .Nd read cylinder groups of UFS disks
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 cgread "struct uufsd *disk"
29 .Ft int
30 .Fn cgread1 "struct uufsd *disk" "int c"
31 .Sh DESCRIPTION
32 The
33 .Fn cgread
34 and
35 .Fn cgread1
36 functions provide cylinder group reads for
37 .Xr libufs 3
38 consumers.
39 The
40 .Fn cgread1
41 function reads from one cylinder group, specified by
42 .Fa c
43 into the
44 .Va d_cg
45 field of a userland UFS disk structure.
46 It sets the
47 .Va d_lcg
48 field to the cylinder group number
49 .Fa c .
50 .Pp
51 The
52 .Fn cgread
53 function operates on sequential cylinder groups.
54 Calling the
55 .Fn cgread
56 function is equivalent to calling
57 .Fn cgread1
58 with a cylinder group specifier equivalent to the value of the current
59 .Va d_ccg
60 field, and then incrementing the
61 .Va d_ccg
62 field.
63 .Sh RETURN VALUES
64 Both functions return 0 if there are no more cylinder groups to read,
65 1 if there are more cylinder groups, and \-1 on error.
66 .Sh ERRORS
67 The function
68 .Fn cgread
69 may fail and set
70 .Va errno
71 for any of the errors specified for the library function
72 .Xr bread 3 .
73 .Pp
74 The function
75 .Fn cgread1
76 has semantically identical failure conditions to those of
77 .Fn cgread .
78 .Sh SEE ALSO
79 .Xr bread 3 ,
80 .Xr libufs 3
81 .Sh HISTORY
82 These functions first appeared as part of
83 .Xr libufs 3
84 in
85 .Fx 5.1 .
86 .Sh AUTHORS
87 .An Juli Mallett Aq jmallett@FreeBSD.org