From: Simon Schubert Date: Wed, 11 Feb 2009 10:25:45 +0000 (+0100) Subject: hammer boot2: reset file offset each time we're looking up a new inode X-Git-Tag: v2.2.0~6^2^2~1 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/9364ac098fc29a7f38f286453fbdd17cf910b689 hammer boot2: reset file offset each time we're looking up a new inode The boot2/ufs code used the implicit assumption that the file offset gets reset each time a new inode is looked up. We have to follow this behavior, or else reads will always start from the last offset of the last file. --- diff --git a/lib/libstand/hammerread.c b/lib/libstand/hammerread.c index 40bdec41b1..d3899ea27f 100644 --- a/lib/libstand/hammerread.c +++ b/lib/libstand/hammerread.c @@ -780,6 +780,9 @@ lookup(const char *path) if (ino == -1) ino = 0; + + fs_off = 0; + return (ino); }