aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdbmopen.c')
-rw-r--r--src/gdbmopen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gdbmopen.c b/src/gdbmopen.c
index 22e7ca6..53d62a4 100644
--- a/src/gdbmopen.c
+++ b/src/gdbmopen.c
@@ -426,13 +426,13 @@ gdbm_fd_open (int fd, const char *file_name, int block_size,
426 dbf->desc = -1; 426 dbf->desc = -1;
427 SAVE_ERRNO (gdbm_close (dbf)); 427 SAVE_ERRNO (gdbm_close (dbf));
428 return NULL; 428 return NULL;
429 } 429 }
430 430
431 /* Wait for initial configuration to be written to disk. */ 431 /* Wait for initial configuration to be written to disk. */
432 __fsync (dbf); 432 gdbm_file_sync (dbf);
433 433
434 free (dbf->bucket); 434 free (dbf->bucket);
435 } 435 }
436 else 436 else
437 { 437 {
438 /* This is an old database. Read in the information from the file 438 /* This is an old database. Read in the information from the file
@@ -505,13 +505,13 @@ gdbm_fd_open (int fd, const char *file_name, int block_size,
505 gdbm_close (dbf); 505 gdbm_close (dbf);
506 GDBM_SET_ERRNO2 (NULL, GDBM_MALLOC_ERROR, FALSE, GDBM_DEBUG_OPEN); 506 GDBM_SET_ERRNO2 (NULL, GDBM_MALLOC_ERROR, FALSE, GDBM_DEBUG_OPEN);
507 return NULL; 507 return NULL;
508 } 508 }
509 509
510 /* Read the hash table directory. */ 510 /* Read the hash table directory. */
511 file_pos = __lseek (dbf, dbf->header->dir, SEEK_SET); 511 file_pos = gdbm_file_seek (dbf, dbf->header->dir, SEEK_SET);
512 if (file_pos != dbf->header->dir) 512 if (file_pos != dbf->header->dir)
513 { 513 {
514 if (!(flags & GDBM_CLOERROR)) 514 if (!(flags & GDBM_CLOERROR))
515 dbf->desc = -1; 515 dbf->desc = -1;
516 SAVE_ERRNO (gdbm_close (dbf)); 516 SAVE_ERRNO (gdbm_close (dbf));
517 GDBM_SET_ERRNO2 (NULL, GDBM_FILE_SEEK_ERROR, FALSE, GDBM_DEBUG_OPEN); 517 GDBM_SET_ERRNO2 (NULL, GDBM_FILE_SEEK_ERROR, FALSE, GDBM_DEBUG_OPEN);

Return to:

Send suggestions and report system problems to the System administrator.