|
@@ -22,7 +22,7 @@
|
22
|
22
|
|
23
|
23
|
#include "libfuncs/libfuncs.h"
|
24
|
24
|
|
25
|
|
-int verbose;
|
|
25
|
+int debug;
|
26
|
26
|
int quiet;
|
27
|
27
|
|
28
|
28
|
static struct videohub_data maindata;
|
|
@@ -31,13 +31,13 @@ static int show_monitor = 0;
|
31
|
31
|
|
32
|
32
|
static const char *program_id = PROGRAM_NAME " Version: " VERSION " Git: " GIT_VER;
|
33
|
33
|
|
34
|
|
-static const char short_options[] = "s:p:qvhVim";
|
|
34
|
+static const char short_options[] = "s:p:qdhVim";
|
35
|
35
|
|
36
|
36
|
static const struct option long_options[] = {
|
37
|
37
|
{ "host", required_argument, NULL, 's' },
|
38
|
38
|
{ "port", required_argument, NULL, 'p' },
|
39
|
39
|
{ "quiet", no_argument, NULL, 'q' },
|
40
|
|
- { "verbose", no_argument, NULL, 'v' },
|
|
40
|
+ { "debug", no_argument, NULL, 'd' },
|
41
|
41
|
{ "help", no_argument, NULL, 'h' },
|
42
|
42
|
{ "version", no_argument, NULL, 'V' },
|
43
|
43
|
{ "info", no_argument, NULL, 'i' },
|
|
@@ -54,7 +54,7 @@ static void show_help(struct videohub_data *data) {
|
54
|
54
|
printf(" -p --port <port_number> | Set device port (default: 9990).\n");
|
55
|
55
|
printf("\n");
|
56
|
56
|
printf("Misc options:\n");
|
57
|
|
- printf(" -v --verbose | Increase logging verbosity.\n");
|
|
57
|
+ printf(" -d --debug | Increase logging verbosity.\n");
|
58
|
58
|
printf(" -q --quiet | Suppress warnings.\n");
|
59
|
59
|
printf(" -h --help | Show help screen.\n");
|
60
|
60
|
printf(" -V --version | Show program version.\n");
|
|
@@ -77,9 +77,9 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
|
77
|
77
|
case 'p': // --port
|
78
|
78
|
data->dev_port = optarg;
|
79
|
79
|
break;
|
80
|
|
- case 'v': // --verbose
|
81
|
|
- verbose++;
|
82
|
|
- if (verbose)
|
|
80
|
+ case 'd': // --debug
|
|
81
|
+ debug++;
|
|
82
|
+ if (debug)
|
83
|
83
|
quiet = 0; // Disable quiet
|
84
|
84
|
break;
|
85
|
85
|
case 'q': // --quiet
|
|
@@ -110,7 +110,7 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
|
110
|
110
|
exit(EXIT_FAILURE);
|
111
|
111
|
}
|
112
|
112
|
|
113
|
|
- v("Device address: %s:%s\n", data->dev_host, data->dev_port);
|
|
113
|
+ d("Device address: %s:%s\n", data->dev_host, data->dev_port);
|
114
|
114
|
}
|
115
|
115
|
|
116
|
116
|
static void print_device_desc(struct device_desc *d) {
|