Fill out (zero) and fill in (when doing getino()) the minimum and maximum

inodes in our inoblock (disk->d_ino{min,max}) appropriately.
This commit is contained in:
Juli Mallett 2002-07-11 21:27:26 +00:00
parent d8c965959f
commit cf6c0643ee
2 changed files with 4 additions and 2 deletions

View File

@ -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];

View File

@ -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) {