Rather than print out a nice error message giving details sufficent to fix

a 'ufs_dirbad' and then panicing (making it very hard to see the details),
put them in the panic message itself.
This commit is contained in:
David E. O'Brien 2006-07-31 15:44:13 +00:00
parent 53c9158f24
commit 80cd95f9cc

View file

@ -593,10 +593,12 @@ ufs_dirbad(ip, offset, how)
struct mount *mp;
mp = ITOV(ip)->v_mount;
(void)printf("%s: bad dir ino %lu at offset %ld: %s\n",
mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
panic("ufs_dirbad: bad dir");
panic("ufs_dirbad: %s: bad dir ino %lu at offset %ld: %s",
mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
else
(void)printf("%s: bad dir ino %lu at offset %ld: %s\n",
mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
}
/*