From 9a139facd06e4a1159a9c2cb992d04bcf1079e7e Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 3 Jun 2025 11:20:56 +0000 Subject: [PATCH] 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 --- sys/fs/pseudofs/pseudofs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index eb4ca8a8245..d8dbf7117d1 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -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__));