Changeset 119a794 in mainline for uspace/app/tmon/test.c


Ignore:
Timestamp:
2017-12-22T11:17:25Z (6 years ago)
Author:
Petr Mánek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab8e0f5
Parents:
ff16da5f
Message:

tmon: use getopt for customize read/write count and size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tmon/test.c

    rff16da5f r119a794  
    4848        devman_handle_t fun = -1;
    4949
    50         if (argc == 0) {
     50        if (argc >= 2 && *argv[1] != '-') {
     51                // Assume that the first argument is device path.
     52                if (tmon_resolve_named(argv[1], &fun))
     53                        return 1;
     54        } else {
     55                // The first argument is either an option or not present.
    5156                if (tmon_resolve_default(&fun))
    5257                        return 1;
    53         } else if (argc == 1) {
    54                 if (tmon_resolve_named(argv[0], &fun))
    55                         return 1;
    56         } else {
    57                 printf(NAME ": Too many arguments provided.\n");
    58                 return 1;
    5958        }
    6059
Note: See TracChangeset for help on using the changeset viewer.