--version should output to stdout, not stderr

This commit is contained in:
Joe Thornber 2012-03-13 12:32:30 +00:00
parent 748e21fc5c
commit 4a1484330d
3 changed files with 9 additions and 3 deletions

View File

@ -80,8 +80,9 @@ int main(int argc, char **argv)
break;
case 'V':
cerr << THIN_PROVISIONING_TOOLS_VERSION << endl;
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
return 0;
default:
usage(basename(argv[0]));
return 1;

View File

@ -93,8 +93,9 @@ int main(int argc, char **argv)
break;
case 'V':
cerr << THIN_PROVISIONING_TOOLS_VERSION << endl;
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
return 0;
default:
usage(basename(argv[0]));
return 1;

View File

@ -81,15 +81,19 @@ int main(int argc, char **argv)
case 'h':
usage(basename(argv[0]));
return 0;
case 'i':
input = optarg;
break;
case 'o':
output = optarg;
break;
case 'V':
cerr << THIN_PROVISIONING_TOOLS_VERSION << endl;
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
return 0;
default:
usage(basename(argv[0]));
return 1;