Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6de2d766 in mainline for uspace/app/usbinfo/main.c


Ignore:
Timestamp:
2012-07-20T18:14:55Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
b828907, be67118
Parents:
7030bc9 (diff), 32260a0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge USB branch.

USB should be endian agnostic now.
OHCI and pci work on qemu powerpc, but pci locks up on real hw.
Hopefully no regressions on amd64/ia32.
Tested on qemu and Virtualbox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/main.c

    r7030bc9 r6de2d766  
    6262
    6363        _OPTION("-h --help", "Print this help and exit.");
     64        _OPTION("-l --list", "Print a list of host controllers and devices.");
    6465        _OPTION("-i --identification", "Brief device identification.");
    6566        _OPTION("-m --match-ids", "Print match ids generated for the device.");
     
    8283        {"help", no_argument, NULL, 'h'},
    8384        {"identification", no_argument, NULL, 'i'},
     85        {"list", no_argument, NULL, 'l'},
    8486        {"match-ids", no_argument, NULL, 'm'},
    8587        {"descriptor-tree", no_argument, NULL, 't'},
     
    9193        {0, 0, NULL, 0}
    9294};
    93 static const char *short_options = "himtTsSrR";
     95static const char *short_options = "hilmtTsSrR";
    9496
    9597static usbinfo_action_t actions[] = {
     
    146148        }
    147149
     150        bool something_active = false;
    148151        /*
    149152         * Process command-line options. They determine what shall be
     
    156159                switch (opt) {
    157160                        case -1:
     161                                break;
     162                        case 'l':
     163                                list();
    158164                                break;
    159165                        case '?':
     
    168174                                        if (actions[idx].opt == opt) {
    169175                                                actions[idx].active = true;
     176                                                something_active = true;
    170177                                                break;
    171178                                        }
     
    178185
    179186        /* Set the default action. */
    180         int idx = 0;
    181         bool something_active = false;
    182         while (actions[idx].opt != 0) {
    183                 if (actions[idx].active) {
    184                         something_active = true;
    185                         break;
    186                 }
    187                 idx++;
    188         }
    189187        if (!something_active) {
    190188                actions[0].active = true;
Note: See TracChangeset for help on using the changeset viewer.