e78ea9f724
getino(3)/putino(3), inode.c has been reworked in Perforce to the point where a manual page may not be accurate. Certainly putino(3) has not even been merged back yet. These will need a lot of improvement for most applications, but they document the API enough to get someone on their feet, most likely. The best documentation still exists in the form of libufs(3) consumers in the base system.
87 lines
1.6 KiB
Groff
87 lines
1.6 KiB
Groff
.\" Author: Juli Mallett <jmallett@FreeBSD.org>
|
|
.\" Date: June 04, 2003
|
|
.\" Description:
|
|
.\" Manual page for libufs functions:
|
|
.\" cgread(3)
|
|
.\" cgread1(3)
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd June 04, 2003
|
|
.Dt CGREAD 3
|
|
.Os
|
|
.Sh NAME
|
|
.Nm cgread , cgread1
|
|
.Nd read cylinder groups of UFS disks
|
|
.Sh LIBRARY
|
|
.Lb libufs
|
|
.Sh SYNOPSIS
|
|
.In sys/types.h
|
|
.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 cgread "struct uufsd *disk"
|
|
.Ft int
|
|
.Fn cgread1 "struct uufsd *disk" "int c"
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Fn cgread
|
|
and
|
|
.Fn cgread1
|
|
functions provide cylinder group reads for
|
|
.Xr libufs 3
|
|
consumers.
|
|
The
|
|
.Fn cgread1
|
|
function reads from one cylinder group, specified by
|
|
.Fa c
|
|
into the
|
|
.Fa d_cg
|
|
field of a userland UFS disk structure.
|
|
It sets the
|
|
.Fa d_lcg
|
|
field to the cylinger group number
|
|
.Fa c .
|
|
.Pp
|
|
The
|
|
.Fn cgread
|
|
function operates on sequential cylinder groups.
|
|
Calling the
|
|
.Fn cgread
|
|
function is equivalent to calling
|
|
.Nm cgread1
|
|
with a cylinder group specifier equivalent to the value of the current
|
|
.Fa d_ccg
|
|
field, and then incrementing the
|
|
.Fa d_ccg
|
|
field.
|
|
.Pp
|
|
Both functions return 0 if there are no more cylinder groups to read,
|
|
1 if there are more cylinder groups, and -1 on error.
|
|
.Sh ERRORS
|
|
The function
|
|
.Fn cgread
|
|
may fail and set
|
|
.Va errno
|
|
for any of the errors specified for the library function
|
|
.Xr bread 3 .
|
|
.Pp
|
|
The function
|
|
.Fn cgread1
|
|
has semantically identical failure conditions to those of
|
|
.Fn cgread .
|
|
.Sh SEE ALSO
|
|
.Xr bread 3 ,
|
|
.Xr libufs 3
|
|
.Sh HISTORY
|
|
These functions first appeared as part of
|
|
.Xr libufs 3
|
|
in
|
|
.Fx 5.1 .
|
|
.Sh AUTHORS
|
|
.An Juli Mallett Aq jmallett@FreeBSD.org
|