cgwrite1 man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

CGREAD(3)		 BSD Library Functions Manual		     CGREAD(3)

     cgread, cgread1, cgwrite1 — read/write cylinder groups of UFS disks

     library “libufs”

     #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>

     cgread(struct uufsd *disk);

     cgread1(struct uufsd *disk, int c);

     cgwrite1(struct uufsd *disk, int c);

     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.

     The cgwrite1() function stores cylinder group specified by c from d_cg
     field of a userland UFS disk structure on disk.

     Both functions return 0 if there are no more cylinder groups to read, 1
     if there are more cylinder groups, and -1 on error.

     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().

     The function cgwrite1() may fail and set errno for any of the errors
     specified for the library function bwrite(3).

     bread(3), bwrite(3), libufs(3)

     These functions first appeared as part of libufs(3) in FreeBSD 5.1.

     Juli Mallett ⟨⟩

BSD				 June 4, 2003				   BSD

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net