Module Name:    src
Committed By:   cube
Date:           Sun Aug 30 21:07:41 UTC 2009

Modified Files:
        src/usr.bin/config: lint.c

Log Message:
For {pseudo-,}devices, check if an instance of the pseudo or the considered
attachment of the device has already been done by the template config file.
If so, don't emit a line.  Reported by John Nemeth.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/config/lint.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/lint.c
diff -u src/usr.bin/config/lint.c:1.7 src/usr.bin/config/lint.c:1.8
--- src/usr.bin/config/lint.c:1.7	Sun Dec 28 01:23:46 2008
+++ src/usr.bin/config/lint.c	Sun Aug 30 21:07:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lint.c,v 1.7 2008/12/28 01:23:46 christos Exp $	*/
+/*	$NetBSD: lint.c,v 1.8 2009/08/30 21:07:41 cube Exp $	*/
 
 /*
  *  Copyright (c) 2007 The NetBSD Foundation.
@@ -124,9 +124,9 @@
 		da->d_isdef = 2;
 	}
 
-	if (at == NULL && !d->d_ispseudo)
+	if (at == NULL && !d->d_ispseudo && d->d_ihead == NULL)
 		printf("%s0\tat\troot\n", d->d_name);
-	else if (!d->d_ispseudo) {
+	else if (at != NULL && !d->d_ispseudo && da->d_ihead == NULL) {
 		printf("%s0\tat\t%s?", d->d_name, at->a_name);
 
 		for (nv = at->a_locs; nv != NULL; nv = nv->nv_next) {
@@ -165,7 +165,7 @@
 {
 	struct devbase *d = value;
 
-	if (d->d_ispseudo)
+	if (d->d_ispseudo && d->d_ihead == NULL)
 		printf("pseudo-device\t%s\n", d->d_name);
 	return 0;
 }

Reply via email to