summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-12-07 00:00:21 +0000
committerdelphij <delphij@FreeBSD.org>2007-12-07 00:00:21 +0000
commite93a39275f61f4da8f8f1fb792c32f91d727d7f1 (patch)
tree58f0794c3fad8817e5ce1a1d9fd136da96504d35 /sys
parentf05fcb702a3aedb88d01d33858e0090587f6039d (diff)
downloadFreeBSD-src-e93a39275f61f4da8f8f1fb792c32f91d727d7f1.zip
FreeBSD-src-e93a39275f61f4da8f8f1fb792c32f91d727d7f1.tar.gz
Turn MPASS(0) into panic with more obvious reason why the assertion
is failed.
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index a855fd0..63a8deb 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -154,7 +154,7 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp, enum vtype type,
break;
default:
- MPASS(0);
+ panic("tmpfs_alloc_node: type %p %d", nnode, (int)nnode->tn_type);
}
TMPFS_LOCK(tmp);
@@ -229,8 +229,7 @@ tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node)
break;
default:
- MPASS(0);
- break;
+ panic("tmpfs_free_node: type %p %d", node, (int)node->tn_type);
}
free_unr(tmp->tm_ino_unr, node->tn_id);
@@ -387,7 +386,7 @@ loop:
break;
default:
- MPASS(0);
+ panic("tmpfs_alloc_vp: type %p %d", node, (int)node->tn_type);
}
vnode_pager_setsize(vp, node->tn_size);
@@ -799,7 +798,8 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, off_t *cntp)
break;
default:
- MPASS(0);
+ panic("tmpfs_dir_getdents: type %p %d",
+ de->td_node, (int)de->td_node->tn_type);
}
d.d_namlen = de->td_namelen;
MPASS(de->td_namelen < sizeof(d.d_name));
OpenPOWER on IntegriCloud