left -= bs;
continue;
} else {
- printf("r=%d\n", r);
td_verror(td, EIO, "pre_read");
break;
}
{
int ret = 0;
- if (len == -1ULL)
+ if (len == -1ULL) {
len = f->io_size;
+ if (len == -1ULL && td->o.fill_device)
+ return 0;
+ }
if (off == -1ULL)
off = f->file_offset;