Whamcloud - gitweb
ChangeLog, ext2_err.et.in, unix_io.c:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 2 Jul 1997 02:41:59 +0000 (02:41 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 2 Jul 1997 02:41:59 +0000 (02:41 +0000)
  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.

lib/ext2fs/ChangeLog
lib/ext2fs/ext2_err.et.in
lib/ext2fs/unix_io.c

index 135aad2..5733631 100644 (file)
@@ -1,5 +1,10 @@
 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>
index 075acee..a51825c 100644 (file)
@@ -224,4 +224,7 @@ ec  EXT2_ET_UNSUPP_FEATURE,
 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
index c2007aa..2be3e70 100644 (file)
@@ -193,7 +193,7 @@ static errcode_t unix_read_blk(io_channel channel, unsigned long block,
        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);
@@ -242,7 +242,7 @@ static errcode_t unix_write_blk(io_channel channel, unsigned long block,
 
        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;
        }