File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ uiomux \- query and manage the UIOMux state
16
16
.B uiomux
17
17
.RI SUBCOMMAND
18
18
19
+ .PP
20
+ \fB uiomux \fR [\-\- version ]
21
+
19
22
.SH DESCRIPTION
20
23
.B uiomux
21
24
is a tool for querying UIO and managing the UIOMux state.
@@ -42,6 +45,14 @@ UIOMux shared state. Note that any subsequent program using UIOMux
42
45
will reallocate and initialize this shared state, including this
43
46
tool's 'info' and 'reset' commands.
44
47
48
+ .SH OPTIONS
49
+ .PP
50
+ \fB uiomux \fR accepts the following options:
51
+
52
+ .SS "Miscellaneous options"
53
+ .IP " \-\- version" 10
54
+ Output version information and exit.
55
+
45
56
.SH AUTHORS
46
57
47
58
uiomux was written by Conrad Parker.
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ usage (void)
62
62
63
63
printf ("\nUtilities:\n" );
64
64
printf (" alloc <n> Allocate a specified number of bytes.\n" );
65
+
66
+ printf ("\nOptions:\n" );
67
+ printf (" --version Show uiomux version info\n" );
68
+
69
+ printf (
"\nPlease report bugs to <[email protected] >\n" );
65
70
}
66
71
67
72
static void
@@ -132,11 +137,20 @@ destroy (void)
132
137
int
133
138
main (int argc , char * argv [])
134
139
{
140
+ int i ;
141
+
135
142
if (argc < 2 ) {
136
143
usage ();
137
144
exit (1 );
138
145
}
139
146
147
+ for (i = 1 ; i < argc ; i ++ ) {
148
+ if (!strncmp (argv [i ], "--version" , 10 )) {
149
+ version ();
150
+ exit (0 );
151
+ }
152
+ }
153
+
140
154
if (!strncmp (argv [1 ], "query" , 6 )) {
141
155
query ();
142
156
} else if (!strncmp (argv [1 ], "info" , 5 )) {
You can’t perform that action at this time.
0 commit comments