Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Having explicit locators is not a sufficient ...
details: https://anonhg.NetBSD.org/src/rev/aa8560e89b0d
branches: trunk
changeset: 586419:aa8560e89b0d
user: cube <cube%NetBSD.org@localhost>
date: Sun Dec 18 23:43:15 2005 +0000
description:
Having explicit locators is not a sufficient condition to be able to have
children for a pseudo-device. Depending on an interface attribute is,
though.
Instead of looking at locators, walk the 'attrs' list and look for an
interface attribute (which might have been added just a few lines before
in case there was explicit locators defined).
Fixes PR#32329 by Valeriy E. Ushakov. Regression test is PSEUDO_PARENT.
diffstat:
usr.bin/config/sem.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (32 lines):
diff -r 7548be6f87ba -r aa8560e89b0d usr.bin/config/sem.c
--- a/usr.bin/config/sem.c Sun Dec 18 23:40:03 2005 +0000
+++ b/usr.bin/config/sem.c Sun Dec 18 23:43:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.16 2005/11/07 18:45:34 erh Exp $ */
+/* $NetBSD: sem.c,v 1.17 2005/12/18 23:43:15 cube Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -351,11 +351,17 @@
attrs = newnv(dev->d_name, NULL, getattr(dev->d_name), 0,
attrs);
- /*
- * Pseudo-devices can have children. Consider them as
- * attaching at root.
- */
- if (ispseudo)
+ }
+
+ /*
+ * Pseudo-devices can have children. Consider them as
+ * attaching at root.
+ */
+ if (ispseudo) {
+ for (nv = attrs; nv != NULL; nv = nv->nv_next)
+ if (((struct attr *)(nv->nv_ptr))->a_iattr)
+ break;
+ if (nv != NULL)
ht_insert(devroottab, dev->d_name, dev);
}
Home |
Main Index |
Thread Index |
Old Index