cgread1(3)
NAME
cgread, cgread1 -- read cylinder groups of UFS disks
LIBRARY
UFS File System Access Library (libufs, -lufs)
SYNOPSIS
#include <sys/param.h>
#include <sys/mount.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <libufs.h>
int
cgread(struct uufsd *disk);
int
cgread1(struct uufsd *disk, int c);
DESCRIPTION
The cgread() and cgread1() functions provide cylinder group reads for
libufs(3) consumers. The cgread1() function reads from one cylinder
group, specified by c into the d_cg field of a userland UFS disk struc-
ture. It sets the d_lcg field to the cylinder group number c.
The cgread() function operates on sequential cylinder groups. Calling
the cgread() function is equivalent to calling cgread1() with a cylinder
group specifier equivalent to the value of the current d_ccg field, and
then incrementing the d_ccg field.
RETURN VALUES
Both functions return 0 if there are no more cylinder groups to read, 1
if there are more cylinder groups, and -1 on error.
ERRORS
The function cgread() may fail and set errno for any of the errors speci-
fied for the library function bread(3).
The function cgread1() has semantically identical failure conditions to
those of cgread().
SEE ALSO
bread(3), libufs(3)
HISTORY
These functions first appeared as part of libufs(3) in FreeBSD 5.1.
AUTHORS
Juli Mallett <jmallett@FreeBSD.org>
FreeBSD 5.4 June 4, 2003 FreeBSD 5.4
SPONSORED LINKS
Man(1) output converted with man2html , sed , awk
FreeBSD Man Pages