unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno is
zero, then return EXT2_IO_LLSEEK_FAILED.
ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
Tue Jun 17 01:33:20 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
+ * unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno
+ is zero, then return EXT2_IO_LLSEEK_FAILED.
+
+ * ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
+
* Release of E2fsprogs 1.11
Mon Jun 16 23:53:06 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
ec EXT2_ET_RO_UNSUPP_FEATURE,
"Filesystem has unsupported read-only feature(s)"
+ec EXT2_IO_LLSEEK_FAILED,
+ "IO Channel failed to seek on read or write"
+
end
size = (count < 0) ? -count : count * channel->block_size;
location = (ext2_loff_t) block * channel->block_size;
if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
- retval = errno;
+ retval = errno ? errno : EXT2_IO_LLSEEK_FAILED;
goto error_out;
}
actual = read(data->dev, buf, size);
location = (ext2_loff_t) block * channel->block_size;
if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
- retval = errno;
+ retval = errno ? errno : EXT2_IO_LLSEEK_FAILED;
goto error_out;
}