*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> bwrite (3)              
Title
Content
Arch
Section
 

BREAD(3)

Contents


NAME    [Toc]    [Back]

     bread, bwrite -- read and write blocks of a UFS filesystem

LIBRARY    [Toc]    [Back]

     UFS File System Access Library (libufs, -lufs)

SYNOPSIS    [Toc]    [Back]

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

     ssize_t
     bread(struct uufsd *disk, ufs2_daddr_t blockno, void *data, size_t size);

     ssize_t
     bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data,
	 size_t size);

DESCRIPTION    [Toc]    [Back]

     The bread() and bwrite() functions provide a block read and write API for
     libufs(3) consumers.  They operate on a userland UFS disk structure, and
     perform the read and write at a given block address, which uses the current
 d_bsize value of the structure.

     The bread() and bwrite() functions return the amount read or written, or
     -1 in case of any error, including short read.

ERRORS    [Toc]    [Back]

     The function bread() may fail and set errno for any of the errors specified
 for the library functions ufs_disk_write(3) or pread(2).  Additionally,
 it may follow the libufs(3) error methodologies in situations where
     the amount of data read is not equal to the amount requested, or in case
     of device error.

     The function bwrite() may fail and set errno for any of the errors specified
 for the library function pwrite(2).  Additionally, it may follow the
     libufs(3) error methodologies in situations where the amount of data
     written is not equal to the amount requested, or in case of a device
     error.

SEE ALSO    [Toc]    [Back]

      
      
     libufs(3), ufs_disk_write(3)

HISTORY    [Toc]    [Back]

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

AUTHORS    [Toc]    [Back]

     Juli Mallett <[email protected]>


FreeBSD 5.2.1			 June 04, 2003			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
sbread FreeBSD read and write superblocks of a UFS filesystem
sbwrite FreeBSD read and write superblocks of a UFS filesystem
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
hfs_revra_per_disk HP-UX maximum HFS file system blocks to be read in one
tis_write_unlock Tru64 Unlocks the specified read-write lock that was acquired for write access
tis_read_unlock Tru64 Unlocks a read-write lock that was acquired for read access
pthread_rwlock_wrlock Tru64 Acquires a read-write lock for write access
tis_write_lock Tru64 Acquires the specified read-write lock for write access
tis_read_lock Tru64 Acquires a read-write lock for read access
pthread_rwlock_rdlock Tru64 Acquires a read-write lock for read access
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service