mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 00:46:29 +00:00
Initial table definitions and coding for repmgr client utility
This commit is contained in:
@@ -8,14 +8,54 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "repmgr.h"
|
||||
#include "repmgr-client.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
puts("repmgr");
|
||||
return 0;
|
||||
int optindex;
|
||||
int c, targ;
|
||||
int action = NO_ACTION;
|
||||
|
||||
set_progname(argv[0]);
|
||||
|
||||
while ((c = getopt_long(argc, argv, "?Vd:h:p:U:S:D:f:R:w:k:FWIvb:rcL:tm:C:", long_options,
|
||||
&optindex)) != -1)
|
||||
{
|
||||
/*
|
||||
* NOTE: some integer parameters (e.g. -p/--port) are stored internally
|
||||
* as strings. We use repmgr_atoi() to check these but discard the
|
||||
* returned integer; repmgr_atoi() will append the error message to the
|
||||
* provided list.
|
||||
*/
|
||||
switch (c)
|
||||
{
|
||||
case OPT_HELP:
|
||||
do_help();
|
||||
exit(SUCCESS);
|
||||
|
||||
case '?':
|
||||
/* Actual help option given */
|
||||
if (strcmp(argv[optind - 1], "-?") == 0)
|
||||
{
|
||||
do_help();
|
||||
exit(SUCCESS);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
do_help(void)
|
||||
{
|
||||
printf(_("%s: replication management tool for PostgreSQL\n"), progname());
|
||||
printf(_("\n"));
|
||||
printf(_("Usage:\n"));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user