Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Don't conplain devclass redifition to the sam...
details: https://anonhg.NetBSD.org/src/rev/cda09ffc112a
branches: trunk
changeset: 332889:cda09ffc112a
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sat Oct 11 09:27:51 2014 +0000
description:
Don't conplain devclass redifition to the same value; it can happen while
resolving dependency.
diffstat:
usr.bin/config/sem.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r c80548bb82d4 -r cda09ffc112a usr.bin/config/sem.c
--- a/usr.bin/config/sem.c Sat Oct 11 09:23:32 2014 +0000
+++ b/usr.bin/config/sem.c Sat Oct 11 09:27:51 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.58 2014/10/11 09:06:29 uebayasi Exp $ */
+/* $NetBSD: sem.c,v 1.59 2014/10/11 09:27:51 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -174,15 +174,17 @@
CFGDBG(3, "device `%s' has iattr `%s'", dev->d_name,
a->a_name);
} else if (a->a_devclass != NULL) {
- if (dev->d_classattr != NULL) {
+ if (dev->d_classattr != NULL && dev->d_classattr != a) {
cfgwarn("device `%s' has multiple classes "
"(`%s' and `%s')",
dev->d_name, dev->d_classattr->a_name,
a->a_name);
}
- dev->d_classattr = a;
- CFGDBG(3, "device `%s' is devclass `%s'", dev->d_name,
- a->a_name);
+ if (dev->d_classattr == NULL) {
+ dev->d_classattr = a;
+ CFGDBG(3, "device `%s' is devclass `%s'", dev->d_name,
+ a->a_name);
+ }
} else {
if (strcmp(dev->d_name, a->a_name) != 0) {
mergedeps(dev, a->a_name);
Home |
Main Index |
Thread Index |
Old Index