Module Name: src Committed By: uebayasi Date: Sat Oct 11 09:27:51 UTC 2014
Modified Files: src/usr.bin/config: sem.c Log Message: Don't conplain devclass redifition to the same value; it can happen while resolving dependency. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/usr.bin/config/sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/config/sem.c diff -u src/usr.bin/config/sem.c:1.58 src/usr.bin/config/sem.c:1.59 --- src/usr.bin/config/sem.c:1.58 Sat Oct 11 09:06:29 2014 +++ src/usr.bin/config/sem.c Sat Oct 11 09:27:51 2014 @@ -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 @@ fixdev(struct devbase *dev) 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);