Index: ChangeLog
===================================================================
RCS file: /home/cvsroot/bios_dev_name/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ChangeLog
--- ChangeLog	28 Sep 2006 16:36:51 -0000	1.1.1.1
+++ ChangeLog	30 Nov 2006 06:11:16 -0000
@@ -0,0 +1,7 @@
+* Wed Nov 28 2006
+- fix usage() being printed on success
+- don't assign BIOS device names to Linux virtual devices (tun0)
+	(thanks to Bill Nottingham for finding both of these)
+
+* Wed Nov 28 2006
+- Release 0.1
Index: src/bios_dev_name.c
===================================================================
RCS file: /home/cvsroot/bios_dev_name/src/bios_dev_name.c,v
retrieving revision 1.2
diff -u -r1.2 bios_dev_name.c
--- src/bios_dev_name.c	29 Sep 2006 04:32:18 -0000	1.2
+++ src/bios_dev_name.c	30 Nov 2006 06:11:16 -0000
@@ -95,7 +95,7 @@
 
 int main(int argc, char *argv[])
 {
-	int i, rc=1;
+	int i, rc=0;
 	char *name;
 	void *cookie = NULL;
 
@@ -113,22 +113,23 @@
 		goto out_cleanup;
 	}
 
+
+	if (!opts.interface) {
+		fprintf(stderr, "Unknown device type, try passing an option like -i\n");
+		rc = 1;
+		goto out_usage;
+	}
+
 	for (i=0; i<opts.argc; i++) {
-		if (opts.interface) {
-			name = kern_to_bios(cookie, opts.argv[i]);
-			if (name) {
-				printf("%s\n", name);
-				rc = 0;
-			}
-			else
-				rc = 2;
-		}
-		else {
-			fprintf(stderr, "Unknown device type %s, try passing an option like -i\n", opts.argv[i]);
-			rc = 1;
-			goto out_usage;
+		name = kern_to_bios(cookie, opts.argv[i]);
+		if (name) {
+			printf("%s\n", name);
 		}
+		else
+			rc |= 2; /* one or more given devices weren't found */
 	}
+	goto out_cleanup;
+
  out_usage:
 	usage();
  out_cleanup:
Index: src/bios_device.c
===================================================================
RCS file: /home/cvsroot/bios_dev_name/src/bios_device.c,v
retrieving revision 1.4
diff -u -r1.4 bios_device.c
--- src/bios_device.c	13 Oct 2006 20:53:54 -0000	1.4
+++ src/bios_device.c	30 Nov 2006 06:11:16 -0000
@@ -281,6 +281,8 @@
 			continue;
 		if (!drvinfo_valid(n))
 			continue;
+		if (!is_ethernet(n)) /* for virtual interfaces */
+			continue;
 		b = malloc(sizeof(*b));
 		if (!b)
 			continue;
