- r = pread(tdb->fd, pad, len, off);
- if (r != (ssize_t)len) {
- /* Ensure ecode is set for log fn. */
- tdb->ecode = TDB_ERR_IO;
- tdb->log(tdb, TDB_DEBUG_FATAL, tdb->log_priv,
- "tdb_read failed at %llu "
- "len=%lld ret=%lld (%s) map_size=%lld\n",
- (long long)off, (long long)len,
- (long long)r, strerror(errno),
- (long long)tdb->map_size);
+ if (tdb->methods->read(tdb, off, pad, len) == -1)