.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "BEFS_BTREE_FIND" "9" "09 October 2005" "" ""
.SH NAME
befs_btree_find \- Find a key in a befs B+tree
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int befs_btree_find (struct super_block * \fIsb\fB, befs_data_stream * \fIds\fB, const char * \fIkey\fB, befs_off_t * \fIvalue\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIsb\fB\fR
Filesystem superblock
.TP
\fB\fIds\fB\fR
Datastream containing btree
.TP
\fB\fIkey\fB\fR
Key string to lookup in btree
.TP
\fB\fIvalue\fB\fR
Value stored with \fIkey\fR
.SH "DESCRIPTION"
.PP
On sucess, returns BEFS_OK and sets *\fIvalue\fR to the value stored
with \fIkey\fR (usually the disk block number of an inode).
.PP
On failure, returns BEFS_ERR or BEFS_BT_NOT_FOUND.
.SH "ALGORITHM"
.PP
Read the superblock and rootnode of the b+tree.
Drill down through the interior nodes using \fBbefs_find_key\fR\&.
Once at the correct leaf node, use \fBbefs_find_key\fR again to get the
actuall value stored with the key.