.TH bread() "" "" "Internal Kernel Routine"
.PC "Read into buffer cache"
.B "#include <sys/buf.h>"
\fBBUF * bread(\fIdevice\^\fB, \fIbno\^\fB, \fIflag\^\fB)\fR
\fBdev_t \fIdev\^\fB; daddr_t \fIbno\^\fB;\fR
.PP
.B bread()
reads the block \fIbno\fR into the buffer cache.
If \fIflag\fR is set, the read is synchronous (that is,
.B bread()
waits for I/O to complete), and returns a pointer to the buffer.
Otherwise, the read is asynchronous (that it, it returns immediately), and
.B bread()
returns NULL.
If the
.B BFERR
bit is set in the buffer's field \fBb_flag\fR,
a read error occurred.
.SH "See Also"
.B
internal kernel routines
.R
