|
|
@ -162,7 +162,10 @@ int imdb_write_rec(imdb_t *db, imdb_rec_t *rec) |
|
|
|
DB_SEEK(db, rec->num * IMDB_REC_LEN); |
|
|
|
DB_SEEK(db, rec->num * IMDB_REC_LEN); |
|
|
|
DB_WRITE(db, rec->data, IMDB_REC_LEN); |
|
|
|
DB_WRITE(db, rec->data, IMDB_REC_LEN); |
|
|
|
|
|
|
|
|
|
|
|
return bytes / IMDB_REC_LEN; |
|
|
|
if (bytes != IMDB_REC_LEN) |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int imdb_read_blk(imdb_t *db, imdb_block_t *blk) |
|
|
|
int imdb_read_blk(imdb_t *db, imdb_block_t *blk) |
|
|
|