Browse Source

Rename -s parameter (host) to -h.

Now the short parameter is the first letter of the long parameter
which is much more natural.
Georgi Chorbadzhiyski 9 years ago
parent
commit
851545ad9f
3 changed files with 6 additions and 5 deletions
  1. 1
    0
      ChangeLog
  2. 1
    1
      README
  3. 4
    4
      videohubctrl.c

+ 1
- 0
ChangeLog View File

@@ -2,6 +2,7 @@
2 2
 xxxx-xx-xx : Version next
3 3
  * Rename -v / --verbose parameter to -d / --debug.
4 4
  * Rename -h parameter (help) to -H.
5
+ * Rename -s parameter (host) to -h.
5 6
 
6 7
 2014-11-27 : Version 0.2
7 8
  * Fix port routing. Previously it was reversed and incorrect.

+ 1
- 1
README View File

@@ -77,7 +77,7 @@ of supported command line parameters:
77 77
  Usage: videohubctrl --host <host> [..commands..]
78 78
 
79 79
 Main options:
80
- -s --host <hostname>       | Set device hostname.
80
+ -h --host <hostname>       | Set device hostname.
81 81
  -p --port <port_number>    | Set device port (default: 9990).
82 82
 
83 83
 Misc options:

+ 4
- 4
videohubctrl.c View File

@@ -31,10 +31,10 @@ 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:qdHVim";
34
+static const char short_options[] = "h:p:qdHVim";
35 35
 
36 36
 static const struct option long_options[] = {
37
-	{ "host",				required_argument, NULL, 's' },
37
+	{ "host",				required_argument, NULL, 'h' },
38 38
 	{ "port",				required_argument, NULL, 'p' },
39 39
 	{ "quiet",				no_argument,       NULL, 'q' },
40 40
 	{ "debug",				no_argument,       NULL, 'd' },
@@ -50,7 +50,7 @@ static void show_help(struct videohub_data *data) {
50 50
 	printf(" Usage: " PROGRAM_NAME " --host <host> [..commands..]\n");
51 51
 	printf("\n");
52 52
 	printf("Main options:\n");
53
-	printf(" -s --host <hostname>       | Set device hostname.\n");
53
+	printf(" -h --host <hostname>       | Set device hostname.\n");
54 54
 	printf(" -p --port <port_number>    | Set device port (default: 9990).\n");
55 55
 	printf("\n");
56 56
 	printf("Misc options:\n");
@@ -71,7 +71,7 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
71 71
 	data->dev_port = "9990";
72 72
 	while ((j = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
73 73
 		switch (j) {
74
-			case 's': // --host
74
+			case 'h': // --host
75 75
 				data->dev_host = optarg;
76 76
 				break;
77 77
 			case 'p': // --port

Loading…
Cancel
Save