Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/config Emit compatible struct devsw_conv when versio...



details:   https://anonhg.NetBSD.org/src/rev/538964eb4698
branches:  trunk
changeset: 756735:538964eb4698
user:      cube <cube%NetBSD.org@localhost>
date:      Fri Jul 30 16:23:49 2010 +0000

description:
Emit compatible struct devsw_conv when version is older than 20100430.

diffstat:

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

diffs (22 lines):

diff -r b827c690d098 -r 538964eb4698 usr.bin/config/mkdevsw.c
--- a/usr.bin/config/mkdevsw.c  Fri Jul 30 16:15:05 2010 +0000
+++ b/usr.bin/config/mkdevsw.c  Fri Jul 30 16:23:49 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkdevsw.c,v 1.9 2010/04/30 20:47:18 pooka Exp $        */
+/*     $NetBSD: mkdevsw.c,v 1.10 2010/07/30 16:23:49 cube Exp $        */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -162,6 +162,12 @@
        fputs("\n/* device conversion table */\n"
                  "struct devsw_conv devsw_conv0[] = {\n", fp);
        TAILQ_FOREACH(dm, &alldevms, dm_next) {
+               if (version < 20100430) {
+                       /* Emit compatible structure */
+                       fprintf(fp, "\t{ \"%s\", %d, %d },\n", dm->dm_name,
+                           dm->dm_bmajor, dm->dm_cmajor);
+                       continue;
+               }
                struct nvlist *nv;
                const char *d_class, *d_flags = "0";
                int d_vec[2] = { 0, 0 };



Home | Main Index | Thread Index | Old Index