summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2006-07-31 15:44:13 +0000
committerobrien <obrien@FreeBSD.org>2006-07-31 15:44:13 +0000
commit9e8f7c8846f79d49f8b249dd09c56c01cbf6f218 (patch)
treecb81f651fe138bdd5de6027dca34291e5d14b33f /sys/ufs
parent5f5d488d28c1081b2d07b91e4ed4b136d1d7bab6 (diff)
downloadFreeBSD-src-9e8f7c8846f79d49f8b249dd09c56c01cbf6f218.zip
FreeBSD-src-9e8f7c8846f79d49f8b249dd09c56c01cbf6f218.tar.gz
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.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_lookup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index f59db65..1155817 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -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);
}
/*
OpenPOWER on IntegriCloud