]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, logdump.c:
authorTheodore Ts'o <tytso@mit.edu>
Fri, 1 Jun 2001 15:22:38 +0000 (15:22 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 1 Jun 2001 15:22:38 +0000 (15:22 +0000)
  logdump.c (read_journal_block): Replace pread with lseek/read combination.

debugfs/ChangeLog
debugfs/logdump.c

index 2e60193b4090cdf21546f820afdd58054043002e..9964624c46e77197f65f239b63171c1dd73e9283 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-01  Theodore Tso  <tytso@valinux.com>
+
+       * logdump.c (read_journal_block): Replace pread with lseek/read
+               combination.
+
 2001-05-25  Theodore Tso  <tytso@valinux.com>
 
        * Release of E2fsprogs 1.20
index 6c9fda4c5b33d22cbe1bf610837f42be9bb1929f..5bcd7ca9e0d972a009048f2d8f4cc42e7d92eae6 100644 (file)
@@ -249,7 +249,12 @@ int read_journal_block(char *cmd, struct journal_source *source, off_t offset,
        int retval;
        
        if (source->where == JOURNAL_IS_EXTERNAL) {
-               retval = pread(source->fd, buf, size, offset);
+               if (lseek(source->fd, offset, SEEK_SET) < 0) {
+                       retval = errno;
+                       com_err(cmd, retval, "while seeking in reading journal");
+                       return retval;
+               }
+               retval = read(source->fd, buf, size);
                if (retval >= 0) {
                        *got = retval;
                        retval = 0;