|
NAMEbread , bwrite —
read and write blocks of a UFS file system
LIBRARYUFS 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>
ssize_t
ssize_t
int
DESCRIPTIONThebread (), bwrite () and
berase () functions provide a block read, write and
erase 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.
RETURN VALUESThebread () and bwrite ()
functions return the amount read or written, or -1 in case of any error,
including short read.
The ERRORSThe functionbread () may fail and set
errno for any of the errors specified for the library
functions
ufs_disk_write(3)
or
pread(2).
The function The function Additionally all three functions 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 ALSOlibufs(3), ufs_disk_write(3)HISTORYThese functions first appeared as part of libufs(3) in FreeBSD 5.0.AUTHORSJuli Mallett <jmallett@FreeBSD.org>
Visit the GSP FreeBSD Man Page Interface. |