1 .\" Author: Juli Mallett <jmallett@FreeBSD.org>
2 .\" Date: June 04, 2003
4 .\" Manual page for libufs functions:
8 .\" This file is in the public domain.
15 .Nd read and write blocks of a UFS file system
21 .In ufs/ufs/ufsmount.h
26 .Fn bread "struct uufsd *disk" "ufs2_daddr_t blockno" "void *data" "size_t size"
29 .Fa "struct uufsd *disk" "ufs2_daddr_t blockno"
30 .Fa "const void *data" "size_t size"
34 .Fa "struct uufsd *disk" "ufs2_daddr_t blockno" "ufs2_daddr_t size"
42 functions provide a block read, write and erase API for
45 They operate on a userland UFS disk structure, and perform the read
46 and write at a given block address, which uses the current
48 value of the structure.
54 functions return the amount read or written, or \-1 in case of any error,
59 function returns non-zero on error.
65 for any of the errors specified for the library functions
74 for any of the errors specified for the library function
81 for any of the errors specified for the library function
84 Additionally all three functions may follow the
86 error methodologies in situations where the amount of data written
87 is not equal to the amount requested, or in case of a device error.
92 These functions first appeared as part of
97 .An Juli Mallett Aq Mt jmallett@FreeBSD.org