diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-07-26 10:43:34 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-07-26 10:43:34 +0300 |
commit | 7fb0d1cbbf7842f2632b7dca0451d6f3918dd7ab (patch) | |
tree | 899bdcd5c62eb632de6fb3c660a192c1929446c9 /src/falloc.c | |
parent | 465e893bfa0cdfb8f260500599fc3af458047a76 (diff) | |
download | gdbm-7fb0d1cbbf7842f2632b7dca0451d6f3918dd7ab.tar.gz gdbm-7fb0d1cbbf7842f2632b7dca0451d6f3918dd7ab.tar.bz2 |
Fix remaining uses of gdbm_set_errno function.
Use the GDBM_SET_ERRNO and GDBM_SET_ERRNO2 macros to make
sure the error gets reported in debug output.
* src/fullio.c (_gdbm_full_read)
(_gdbm_full_write): Return -1 and set gdbm_errno
on error.
* src/bucket.c: Use GDBM_SET_ERRNO(2?) or
GDBM_DEBUG where necessary.
* src/falloc.c: Likewise.
* src/findkey.c: Likewise.
* src/gdbmdefs.h: Likewise.
* src/gdbmopen.c: Likewise.
* src/gdbmstore.c: Likewise.
* src/mmap.c: Likewise.
* src/recover.c: Likewise.
* src/update.c: Likewise.
Diffstat (limited to 'src/falloc.c')
-rw-r--r-- | src/falloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/falloc.c b/src/falloc.c index c5ffdc3..516a197 100644 --- a/src/falloc.c +++ b/src/falloc.c @@ -202,7 +202,6 @@ pop_avail_block (GDBM_FILE dbf) _gdbm_full_read (dbf, new_blk, new_el.av_size)); if (rc) { - GDBM_SET_ERRNO (dbf, rc, TRUE); _gdbm_fatal (dbf, gdbm_strerror (rc)); return -1; } @@ -321,7 +320,9 @@ push_avail_block (GDBM_FILE dbf) _gdbm_full_write (dbf, temp, av_size)); if (rc) { - GDBM_SET_ERRNO (dbf, rc, TRUE); + GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, + "%s: error writing avail data: %s", + dbf->name, gdbm_db_strerror (dbf)); _gdbm_fatal (dbf, gdbm_strerror (rc)); return -1; } |