1
<!--$Id: set_func_read.so,v 10.7 2001/05/01 14:23:14 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB: db_env_set_func_read</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a>
12
<table width="100%"><tr valign=top>
14
<h1>db_env_set_func_read</h1>
17
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
25
db_env_set_func_read(ssize_t (*func_read)(int fd, void *buf, size_t nbytes));
28
<p>Replace Berkeley DB calls to the IEEE/ANSI Std 1003.1 (POSIX) <b>read</b> function
29
with <b>func_read</b>, which must conform to the standard interface.
30
<p>The db_env_set_func_read interface affects the entire application, not a single
31
database or database environment.
32
<p>Although the db_env_set_func_read interface may be used to configure Berkeley DB at any time
33
during the life of the application, it should normally be called before
34
making any calls to the <a href="../api_c/env_create.html">db_env_create</a> or <a href="../api_c/db_create.html">db_create</a> functions.
35
<p>The db_env_set_func_read function returns a non-zero error value on failure and 0 on success.
37
<p>The db_env_set_func_read function may fail and return a non-zero error for the following conditions:
39
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
41
<p>The db_env_set_func_read function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.
42
If a catastrophic error has occurred, the db_env_set_func_read function may fail and return
43
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
46
<a href="../api_c/set_func_close.html">db_env_set_func_close</a>,
47
<a href="../api_c/set_func_dirfree.html">db_env_set_func_dirfree</a>,
48
<a href="../api_c/set_func_dirlist.html">db_env_set_func_dirlist</a>,
49
<a href="../api_c/set_func_exists.html">db_env_set_func_exists</a>,
50
<a href="../api_c/set_func_free.html">db_env_set_func_free</a>,
51
<a href="../api_c/set_func_fsync.html">db_env_set_func_fsync</a>,
52
<a href="../api_c/set_func_ioinfo.html">db_env_set_func_ioinfo</a>,
53
<a href="../api_c/set_func_malloc.html">db_env_set_func_malloc</a>,
54
<a href="../api_c/set_func_map.html">db_env_set_func_map</a>,
55
<a href="../api_c/set_func_open.html">db_env_set_func_open</a>,
56
<a href="../api_c/set_func_read.html">db_env_set_func_read</a>,
57
<a href="../api_c/set_func_realloc.html">db_env_set_func_realloc</a>,
58
<a href="../api_c/set_func_seek.html">db_env_set_func_seek</a>,
59
<a href="../api_c/set_func_sleep.html">db_env_set_func_sleep</a>,
60
<a href="../api_c/set_func_unlink.html">db_env_set_func_unlink</a>,
61
<a href="../api_c/set_func_unmap.html">db_env_set_func_unmap</a>,
62
<a href="../api_c/set_func_write.html">db_env_set_func_write</a>,
64
<a href="../api_c/set_func_yield.html">db_env_set_func_yield</a>.
66
<table width="100%"><tr><td><br></td><td align=right>
67
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
69
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>