Remove undocumented -h (help) option
The -h option was not supported by many tools, and not documented, so remove them for consistency from pg_upgrade, pg_test_fsync, and pg_test_timing.
This commit is contained in:
parent
031cc55bbe
commit
06b804377c
@ -146,8 +146,7 @@ handle_args(int argc, char *argv[])
|
|||||||
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
|
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
|
||||||
strcmp(argv[1], "-?") == 0)
|
|
||||||
{
|
{
|
||||||
printf("Usage: %s [-f FILENAME] [-s SECS-PER-TEST]\n", progname);
|
printf("Usage: %s [-f FILENAME] [-s SECS-PER-TEST]\n", progname);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -49,8 +49,7 @@ handle_args(int argc, char *argv[])
|
|||||||
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
|
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
|
||||||
strcmp(argv[1], "-?") == 0)
|
|
||||||
{
|
{
|
||||||
printf("Usage: %s [-d DURATION]\n", progname);
|
printf("Usage: %s [-d DURATION]\n", progname);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -2002,13 +2002,12 @@ main(int argc, char **argv)
|
|||||||
/* support --help and --version even if invoked as root */
|
/* support --help and --version even if invoked as root */
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0 ||
|
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
|
||||||
strcmp(argv[1], "-?") == 0)
|
|
||||||
{
|
{
|
||||||
do_help();
|
do_help();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[1], "-V") == 0 || strcmp(argv[1], "--version") == 0)
|
else if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
|
||||||
{
|
{
|
||||||
puts("pg_ctl (PostgreSQL) " PG_VERSION);
|
puts("pg_ctl (PostgreSQL) " PG_VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -558,7 +558,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
/* Actual help option given */
|
/* Actual help option given */
|
||||||
if (strcmp(argv[optind - 1], "-?") == 0 || strcmp(argv[optind - 1], "--help") == 0)
|
if (strcmp(argv[optind - 1], "--help") == 0 || strcmp(argv[optind - 1], "-?") == 0)
|
||||||
{
|
{
|
||||||
usage();
|
usage();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
Loading…
Reference in New Issue
Block a user