Changeset 99ea659c in mainline for uspace/app/usbinfo/main.c


Ignore:
Timestamp:
2010-12-10T08:58:49Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad79d80, cdc1aa1
Parents:
2c5cefa
Message:

App `usbinfo' has default HC set

File:
1 edited

Legend:

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

    r2c5cefa r99ea659c  
    4444#include "usbinfo.h"
    4545
     46#define DEFAULT_HOST_CONTROLLER_PATH "/virt/usbhc"
     47
    4648static void print_usage(char *app_name)
    4749{
    4850        printf(NAME ": query USB devices for descriptors\n\n");
    4951        printf("Usage: %s /path/to/hc usb-address\n where\n", app_name);
    50         printf("   /path/to/hc   Devman path to USB host controller\n");
     52        printf("   /path/to/hc   Devman path to USB host controller " \
     53            "(use `-' for\n");
     54        printf("                   default HC at `%s').\n",
     55            DEFAULT_HOST_CONTROLLER_PATH);
    5156        printf("   usb-address   USB address of device to be queried\n");
    5257        printf("\n");
     
    6873}
    6974
    70 int main(int argc, char * argv[])
     75int main(int argc, char *argv[])
    7176{
    7277        if (argc != 3) {
     
    8186         * Connect to given host controller driver.
    8287         */
     88        if (str_cmp(hc_path, "-") == 0) {
     89                hc_path = (char *) DEFAULT_HOST_CONTROLLER_PATH;
     90        }
    8391        int hc_phone = connect_to_hc(hc_path);
    8492        if (hc_phone < 0) {
Note: See TracChangeset for help on using the changeset viewer.