mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
pseudofs: enhance KASSERT with more information
Add the name and type information to a KASSERT for 'homonymous siblings'. Without this (or a core file) we do not even know which entry to look for. This should make reporting and debugging a tad more simple. Prompted by: PR 287165
This commit is contained in:
parent
2a35b00732
commit
9a139facd0
1 changed files with 2 additions and 1 deletions
|
|
@ -124,7 +124,8 @@ pfs_add_node(struct pfs_node *parent, struct pfs_node *pn)
|
|||
("%s(): nested process directories", __func__));
|
||||
for (iter = parent->pn_nodes; iter != NULL; iter = iter->pn_next) {
|
||||
KASSERT(strcmp(pn->pn_name, iter->pn_name) != 0,
|
||||
("%s(): homonymous siblings", __func__));
|
||||
("%s(): homonymous siblings: '%s' type %d", __func__,
|
||||
pn->pn_name, pn->pn_type));
|
||||
if (pn->pn_type == pfstype_procdir)
|
||||
KASSERT(iter->pn_type != pfstype_procdir,
|
||||
("%s(): sibling process directories", __func__));
|
||||
|
|
|
|||
Loading…
Reference in a new issue