Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/usbdevs Try to dump device at address 0. Allows du...



details:   https://anonhg.NetBSD.org/src/rev/e2e2aff4eaf0
branches:  trunk
changeset: 789987:e2e2aff4eaf0
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Sep 14 14:07:56 2013 +0000

description:
Try to dump device at address 0.  Allows dumping of xhci(4) root hub.

diffstat:

 usr.sbin/usbdevs/usbdevs.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 61cc0956e597 -r e2e2aff4eaf0 usr.sbin/usbdevs/usbdevs.c
--- a/usr.sbin/usbdevs/usbdevs.c        Sat Sep 14 14:06:40 2013 +0000
+++ b/usr.sbin/usbdevs/usbdevs.c        Sat Sep 14 14:07:56 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdevs.c,v 1.29 2013/07/08 14:47:18 jakllsch Exp $    */
+/*     $NetBSD: usbdevs.c,v 1.30 2013/09/14 14:07:56 jakllsch Exp $    */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -174,7 +174,7 @@
 {
        int a;
 
-       for (a = 1; a < USB_MAX_DEVICES; a++) {
+       for (a = 0; a < USB_MAX_DEVICES; a++) {
                if (!done[a])
                        usbdev(f, a, 1);
        }
@@ -187,7 +187,7 @@
                printf("Controller %s:\n", name);
        indent = 0;
        memset(done, 0, sizeof done);
-       if (addr)
+       if (addr >= 0)
                usbdev(f, addr, 0);
        else
                usbdump(f);
@@ -199,7 +199,7 @@
        int ch, i, f;
        char buf[50];
        char *dev = NULL;
-       int addr = 0;
+       int addr = -1;
        int ncont;
 
        while ((ch = getopt(argc, argv, "a:df:v?")) != -1) {



Home | Main Index | Thread Index | Old Index