#include <string.h>
#include "options.h"
+#include "debug.h"
static void set_default_options(struct plotter_options *opts)
{
static struct option long_options[] = {
{ .val = 'd', .name = "device", .has_arg = 1, },
{ .val = 'o', .name = "output", .has_arg = 1 },
- { .val = 'o', .name = "baud", .has_arg = 1 },
+ { .val = 'b', .name = "baud", .has_arg = 1 },
+ { .val = 'v', .name = "verbose", .has_arg = 2 },
+ { .val = 'q', .name = "quiet", },
};
- char short_options[] = "d:o:b:";
+ char short_options[] = "d:o:b:vq";
set_default_options(opts);
case 'b':
opts->baud_rate = atoi(optarg);
break;
+ case 'v':
+ trace_level++;
+ pr_debug("Increased trace level to %d\n", trace_level);
+ break;
+ case 'q':
+ trace_level--;
+ pr_debug("Degreased trace level to %d\n", trace_level);
+ break;
case '?':
return -1;
}