Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
#include <getopt.h>
#include <string.h>
#include <getopt.h>
#include <string.h>
int option_index = 0, c;
static struct option long_options[] = {
{ .val = 'd', .name = "device", .has_arg = 1, },
int option_index = 0, c;
static struct option long_options[] = {
{ .val = 'd', .name = "device", .has_arg = 1, },
- { .val = 'v', .name = "verbose", },
+ { .val = 'v', .name = "verbose", .has_arg = 2},
};
char short_options[] = "d:v";
};
char short_options[] = "d:v";
opts->usbdev = optarg;
break;
case 'v':
opts->usbdev = optarg;
break;
case 'v':
+ if (optarg)
+ opts->trace_level = atoi(optarg);
+ else
+ opts->trace_level++;