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:
parent
af57cfe6de
commit
76d4ab77bd
@ -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];
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user