Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2008 05:42:45 GMT
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 143681 for review
Message-ID:  <200806180542.m5I5gj0i085237@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143681

Change 143681 by weongyo@weongyo_ws on 2008/06/18 05:41:56

	handle (PCI|PCMCIA|USB) .INF files correctly that specify multiple
	entries in [Manufacturer] sections.

Affected files ...

.. //depot/projects/ndisusb/usr.sbin/ndiscvt/inf.c#3 edit

Differences ...

==== //depot/projects/ndisusb/usr.sbin/ndiscvt/inf.c#3 (text+ko) ====

@@ -285,7 +285,7 @@
 	struct section *sec;
 	struct assign *assign;
 	char xpsec[256];
-	int found = 0;
+	int first = 1, found = 0;
 
 	/* Find manufacturer name */
 	manf = find_assign("Manufacturer", NULL);
@@ -322,8 +322,11 @@
 
 	found = 0;
 
-	/* Emit start of PCI device table */
-	fprintf (ofp, "#define NDIS_PCI_DEV_TABLE");
+	if (first == 1) {
+		/* Emit start of PCI device table */
+		fprintf (ofp, "#define NDIS_PCI_DEV_TABLE");
+		first = 0;
+	}
 
 retry:
 
@@ -375,7 +378,7 @@
 	struct section *sec;
 	struct assign *assign;
 	char xpsec[256];
-	int found = 0;
+	int first = 1, found = 0;
 
 	/* Find manufacturer name */
 	manf = find_assign("Manufacturer", NULL);
@@ -412,8 +415,11 @@
 
 	found = 0;
 
-	/* Emit start of PCMCIA device table */
-	fprintf (ofp, "#define NDIS_PCMCIA_DEV_TABLE");
+	if (first == 1) {
+		/* Emit start of PCMCIA device table */
+		fprintf (ofp, "#define NDIS_PCMCIA_DEV_TABLE");
+		first = 0;
+	}
 
 retry:
 
@@ -465,7 +471,7 @@
 	struct section *sec;
 	struct assign *assign;
 	char xpsec[256];
-	int found = 0;
+	int first = 1, found = 0;
 
 	/* Find manufacturer name */
 	manf = find_assign("Manufacturer", NULL);
@@ -502,8 +508,11 @@
 
 	found = 0;
 
-	/* Emit start of USB device table */
-	fprintf (ofp, "#define NDIS_USB_DEV_TABLE");
+	if (first == 1) {
+		/* Emit start of USB device table */
+		fprintf (ofp, "#define NDIS_USB_DEV_TABLE");
+		first = 0;
+	}
 
 retry:
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806180542.m5I5gj0i085237>