diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-07-11 21:27:26 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-07-11 21:27:26 +0000 |
commit | 9c7ad0f5fdbb8b0a03f7bfa0374a32ab7d9d470a (patch) | |
tree | 0cf8d7515279c37fb8390dc4535a26f977e30c97 | |
parent | b790e6b937c0ea507fee6487ef1384be4f0900d7 (diff) | |
download | FreeBSD-src-9c7ad0f5fdbb8b0a03f7bfa0374a32ab7d9d470a.zip FreeBSD-src-9c7ad0f5fdbb8b0a03f7bfa0374a32ab7d9d470a.tar.gz |
Fill out (zero) and fill in (when doing getino()) the minimum and maximum
inodes in our inoblock (disk->d_ino{min,max}) appropriately.
-rw-r--r-- | lib/libufs/inode.c | 4 | ||||
-rw-r--r-- | lib/libufs/type.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/libufs/inode.c b/lib/libufs/inode.c index e823cdb..ba3b29e 100644 --- a/lib/libufs/inode.c +++ b/lib/libufs/inode.c @@ -74,8 +74,8 @@ getino(struct uufsd *disk, void **dino, ino_t inode, int *mode) goto gotit; bread(disk, fsbtodb(fs, ino_to_fsba(fs, inode)), inoblock, fs->fs_bsize); - min = inode - (inode & INOPB(fs)); - max = min + INOPB(fs); + disk->d_inomin = min = inode - (inode & INOPB(fs)); + disk->d_inomax = max = min + INOPB(fs); gotit: switch (disk->d_ufs) { case 1: dp1 = &((struct ufs1_dinode *)inoblock)[inode - min]; diff --git a/lib/libufs/type.c b/lib/libufs/type.c index 220d34b..59b8f8c 100644 --- a/lib/libufs/type.c +++ b/lib/libufs/type.c @@ -105,6 +105,8 @@ ufs_disk_fillout(struct uufsd *disk, const char *name) disk->d_bsize = 1; disk->d_fd = fd; disk->d_inoblock = NULL; + disk->d_inomin = 0; + disk->d_inomax = 0; disk->d_name = name; if (sbread(disk) == -1) { |