pvtools: make -V show version, -v show full structure

This commit is contained in:
Michael Davidsaver
2017-10-06 14:36:27 +02:00
parent 393ac72785
commit 2a1ba9418e
5 changed files with 27 additions and 19 deletions

View File

@@ -1028,9 +1028,9 @@ string request(DEFAULT_REQUEST);
void usage (void)
{
fprintf (stderr, "\nUsage: eget [options] [<PV name>... | -s <service name>]\n\n"
" -h: Help: Print this message\n"
" -v: Print version and exit\n"
"\noptions:\n"
" -h: Help: Print this message\n"
" -V: Print version and exit\n"
" -s <service name>: Service API compliant based RPC service name (accepts NTURI request argument)\n"
" -a <service arg>: Service argument in 'name[=value]' or 'name value' form\n"
" -r <pv request>: Get request string, specifies what fields to return and options, default is '%s'\n"
@@ -1459,12 +1459,12 @@ int main (int argc, char *argv[])
setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */
while ((opt = getopt(argc, argv, ":hvr:s:a:w:zNtTmxp:qdcF:f:ni")) != -1) {
while ((opt = getopt(argc, argv, ":hVr:s:a:w:zNtTmxp:qdcF:f:ni")) != -1) {
switch (opt) {
case 'h': /* Print usage */
usage();
return 0;
case 'v': /* Print version */
case 'V': /* Print version */
{
Version version("eget", "cpp",
EPICS_PVA_MAJOR_VERSION,