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.
17 .Nd read and write blocks of a UFS file system
23 .In ufs/ufs/ufsmount.h
28 .Fn bread "struct uufsd *disk" "ufs2_daddr_t blockno" "void *data" "size_t size"
31 .Fa "struct uufsd *disk" "ufs2_daddr_t blockno"
32 .Fa "const void *data" "size_t size"
36 .Fa "struct uufsd *disk" "ufs2_daddr_t blockno" "ufs2_daddr_t size"
44 functions provide a block read, write and erase API for
47 They operate on a userland UFS disk structure, and perform the read
48 and write at a given block address, which uses the current
50 value of the structure.
56 functions return the amount read or written, or \-1 in case of any error,
61 function returns non-zero on error.
67 for any of the errors specified for the library functions
76 for any of the errors specified for the library function
83 for any of the errors specified for the library function
86 Additionally all three functions may follow the
88 error methodologies in situations where the amount of data written
89 is not equal to the amount requested, or in case of a device error.
94 These functions first appeared as part of
99 .An Juli Mallett Aq jmallett@FreeBSD.org