summaryrefslogtreecommitdiffabout
path: root/src
Unidiff
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/falloc.c4
-rw-r--r--src/findkey.c2
-rw-r--r--src/gdbmstore.c4
-rw-r--r--src/gdbmtool.c17
-rw-r--r--src/update.c2
5 files changed, 10 insertions, 19 deletions
diff --git a/src/falloc.c b/src/falloc.c
index 33a238a..e87a5b7 100644
--- a/src/falloc.c
+++ b/src/falloc.c
@@ -202,7 +202,7 @@ pop_avail_block (GDBM_FILE dbf)
202 _gdbm_full_read (dbf, new_blk, new_el.av_size)); 202 _gdbm_full_read (dbf, new_blk, new_el.av_size));
203 if (rc) 203 if (rc)
204 { 204 {
205 _gdbm_fatal (dbf, gdbm_strerror (rc)); 205 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
206 return -1; 206 return -1;
207 } 207 }
208 208
@@ -330,7 +330,7 @@ push_avail_block (GDBM_FILE dbf)
330 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 330 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,
331 "%s: error writing avail data: %s", 331 "%s: error writing avail data: %s",
332 dbf->name, gdbm_db_strerror (dbf)); 332 dbf->name, gdbm_db_strerror (dbf));
333 _gdbm_fatal (dbf, gdbm_strerror (rc)); 333 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
334 return -1; 334 return -1;
335 } 335 }
336 336
diff --git a/src/findkey.c b/src/findkey.c
index 211d9a9..7638b04 100644
--- a/src/findkey.c
+++ b/src/findkey.c
@@ -83,7 +83,7 @@ _gdbm_read_entry (GDBM_FILE dbf, int elem_loc)
83 "%s: error reading entry: %s", 83 "%s: error reading entry: %s",
84 dbf->name, gdbm_db_strerror (dbf)); 84 dbf->name, gdbm_db_strerror (dbf));
85 dbf->need_recovery = TRUE; 85 dbf->need_recovery = TRUE;
86 _gdbm_fatal (dbf, gdbm_strerror (rc)); 86 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
87 return NULL; 87 return NULL;
88 } 88 }
89 89
diff --git a/src/gdbmstore.c b/src/gdbmstore.c
index 0bcd7d7..7b2ed04 100644
--- a/src/gdbmstore.c
+++ b/src/gdbmstore.c
@@ -167,7 +167,7 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags)
167 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 167 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,
168 "%s: error writing key: %s", 168 "%s: error writing key: %s",
169 dbf->name, gdbm_db_strerror (dbf)); 169 dbf->name, gdbm_db_strerror (dbf));
170 _gdbm_fatal (dbf, gdbm_strerror (rc)); 170 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
171 return -1; 171 return -1;
172 } 172 }
173 173
@@ -179,7 +179,7 @@ gdbm_store (GDBM_FILE dbf, datum key, datum content, int flags)
179 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 179 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,
180 "%s: error writing content: %s", 180 "%s: error writing content: %s",
181 dbf->name, gdbm_db_strerror (dbf)); 181 dbf->name, gdbm_db_strerror (dbf));
182 _gdbm_fatal (dbf, gdbm_strerror (rc)); 182 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
183 return -1; 183 return -1;
184 } 184 }
185 185
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index 18d0e10..33bdf93 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -195,7 +195,6 @@ _gdbm_avail_list_size (GDBM_FILE dbf, size_t min_size)
195 int size; 195 int size;
196 avail_block *av_stk; 196 avail_block *av_stk;
197 size_t lines; 197 size_t lines;
198 int rc;
199 198
200 lines = 4 + dbf->header->avail.count; 199 lines = 4 + dbf->header->avail.count;
201 if (lines > min_size) 200 if (lines > min_size)
@@ -215,13 +214,9 @@ _gdbm_avail_list_size (GDBM_FILE dbf, size_t min_size)
215 break; 214 break;
216 } 215 }
217 216
218 if ((rc = _gdbm_full_read (dbf, av_stk, size))) 217 if (_gdbm_full_read (dbf, av_stk, size))
219 { 218 {
220 if (rc == GDBM_FILE_EOF) 219 terror ("read: %s", gdbm_db_strerror (dbf));
221 terror ("read: %s", gdbm_strerror (rc));
222 else
223 terror ("read: %s (%s)",
224 gdbm_strerror (rc), strerror (errno));
225 break; 220 break;
226 } 221 }
227 222
@@ -256,7 +251,6 @@ _gdbm_print_avail_list (FILE *fp, GDBM_FILE dbf)
256 int temp; 251 int temp;
257 int size; 252 int size;
258 avail_block *av_stk; 253 avail_block *av_stk;
259 int rc;
260 254
261 /* Print the the header avail block. */ 255 /* Print the the header avail block. */
262 fprintf (fp, _("\nheader block\nsize = %d\ncount = %d\n"), 256 fprintf (fp, _("\nheader block\nsize = %d\ncount = %d\n"),
@@ -278,12 +272,9 @@ _gdbm_print_avail_list (FILE *fp, GDBM_FILE dbf)
278 break; 272 break;
279 } 273 }
280 274
281 if ((rc = _gdbm_full_read (dbf, av_stk, size))) 275 if (_gdbm_full_read (dbf, av_stk, size))
282 { 276 {
283 if (rc == GDBM_FILE_EOF) 277 terror ("read: %s", gdbm_db_strerror (dbf));
284 terror ("read: %s", gdbm_strerror (rc));
285 else
286 terror ("read: %s (%s)", gdbm_strerror (rc), strerror (errno));
287 break; 278 break;
288 } 279 }
289 280
diff --git a/src/update.c b/src/update.c
index 905ba69..63c6c95 100644
--- a/src/update.c
+++ b/src/update.c
@@ -112,7 +112,7 @@ _gdbm_end_update (GDBM_FILE dbf)
112 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR, 112 GDBM_DEBUG (GDBM_DEBUG_STORE|GDBM_DEBUG_ERR,
113 "%s: error writing directory: %s", 113 "%s: error writing directory: %s",
114 dbf->name, gdbm_db_strerror (dbf)); 114 dbf->name, gdbm_db_strerror (dbf));
115 _gdbm_fatal (dbf, gdbm_strerror (rc)); 115 _gdbm_fatal (dbf, gdbm_db_strerror (dbf));
116 return -1; 116 return -1;
117 } 117 }
118 118

Return to:

Send suggestions and report system problems to the System administrator.