Module Name:    src
Committed By:   cube
Date:           Fri Jul 30 16:23:49 UTC 2010

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

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


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/config/mkdevsw.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/mkdevsw.c
diff -u src/usr.bin/config/mkdevsw.c:1.9 src/usr.bin/config/mkdevsw.c:1.10
--- src/usr.bin/config/mkdevsw.c:1.9	Fri Apr 30 20:47:18 2010
+++ src/usr.bin/config/mkdevsw.c	Fri Jul 30 16:23:49 2010
@@ -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 };

Reply via email to