Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config For {pseudo-, }devices, check if an instance o...



details:   https://anonhg.NetBSD.org/src/rev/c4d3fe026176
branches:  trunk
changeset: 747054:c4d3fe026176
user:      cube <cube%NetBSD.org@localhost>
date:      Sun Aug 30 21:07:41 2009 +0000

description:
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.

diffstat:

 usr.bin/config/lint.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r edd137f18e87 -r c4d3fe026176 usr.bin/config/lint.c
--- a/usr.bin/config/lint.c     Sun Aug 30 19:24:40 2009 +0000
+++ b/usr.bin/config/lint.c     Sun Aug 30 21:07:41 2009 +0000
@@ -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;
 }



Home | Main Index | Thread Index | Old Index