diff options
Diffstat (limited to 'doc/gdbm.texi')
-rw-r--r-- | doc/gdbm.texi | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/gdbm.texi b/doc/gdbm.texi index d172ad7..8096215 100644 --- a/doc/gdbm.texi +++ b/doc/gdbm.texi | |||
@@ -258,9 +258,14 @@ characters to this name). | |||
258 | It is used during initialization to determine the size of various | 258 | It is used during initialization to determine the size of various |
259 | constructs. It is the size of a single transfer from disk to | 259 | constructs. It is the size of a single transfer from disk to |
260 | memory. This parameter is ignored if the file has been previously | 260 | memory. This parameter is ignored if the file has been previously |
261 | initialized. The minimum size is 512. If the value is less than 512, | 261 | initialized. If the value is less than 512, the file system block |
262 | the file system block size is used, otherwise the value of | 262 | size is used instead. The size is adjusted so that the block can hold |
263 | @var{block_size} is used. | 263 | exact number of directory entries, so that the effective block size |
264 | can be slightly greater than requested. However, if the | ||
265 | @samp{GDBM_BSEXACT} flag is set and the size needs to be adjusted, the | ||
266 | function will return with error status, setting the @samp{gdbm_errno} | ||
267 | variable to @samp{GDBM_BLOCK_SIZE_ERROR}. | ||
268 | |||
264 | @item flags | 269 | @item flags |
265 | @kwindex GDBM_READER | 270 | @kwindex GDBM_READER |
266 | @kwindex GDBM_WRITER | 271 | @kwindex GDBM_WRITER |
@@ -287,6 +292,12 @@ from performing any locking on the database file, and @samp{GDBM_NOMMAP}, | |||
287 | which disables the memory mapping mechanism. The option @samp{GDBM_FAST} is | 292 | which disables the memory mapping mechanism. The option @samp{GDBM_FAST} is |
288 | now obsolete, since @code{gdbm} defaults to no-sync mode. | 293 | now obsolete, since @code{gdbm} defaults to no-sync mode. |
289 | 294 | ||
295 | @kwindex GDBM_BSEXACT | ||
296 | If this flag is set and the requested @var{block_size} cannot be used | ||
297 | without adjustment, @code{gdbm_open} will refuse to create the | ||
298 | databases. In this case it will set the @samp{gdbm_errno} | ||
299 | variable to @samp{GDBM_BLOCK_SIZE_ERROR} and return @samp{NULL}. | ||
300 | |||
290 | @kwindex GDBM_CLOEXEC | 301 | @kwindex GDBM_CLOEXEC |
291 | @cindex close-on-exec | 302 | @cindex close-on-exec |
292 | If the host @samp{open} call | 303 | If the host @samp{open} call |
@@ -1233,9 +1244,11 @@ No error occurred. | |||
1233 | Memory allocation failed. Not enough memory. | 1244 | Memory allocation failed. Not enough memory. |
1234 | 1245 | ||
1235 | @kwindex GDBM_BLOCK_SIZE_ERROR | 1246 | @kwindex GDBM_BLOCK_SIZE_ERROR |
1247 | @kwindex GDBM_BSEXACT | ||
1236 | @item GDBM_BLOCK_SIZE_ERROR | 1248 | @item GDBM_BLOCK_SIZE_ERROR |
1237 | This error is set by the @code{gdbm_open} function (@pxref{Open}), if | 1249 | This error is set by the @code{gdbm_open} function (@pxref{Open}), if |
1238 | the value of its @var{block_size} argument is incorrect. | 1250 | the value of its @var{block_size} argument is incorrect and the |
1251 | @samp{GDBM_BSEXACT} flag is set. | ||
1239 | 1252 | ||
1240 | @kwindex GDBM_FILE_OPEN_ERROR | 1253 | @kwindex GDBM_FILE_OPEN_ERROR |
1241 | @item GDBM_FILE_OPEN_ERROR | 1254 | @item GDBM_FILE_OPEN_ERROR |