Break out error codes, cleanup header files and HISTORY

This commit is contained in:
Greg Smith
2011-02-15 00:43:36 -05:00
parent f6618a01c7
commit 45022debc6
6 changed files with 81 additions and 33 deletions

View File

@@ -26,13 +26,13 @@
#include "strutil.h"
#include "dbutils.h"
#include "errcode.h"
#define PRIMARY_MODE 0
#define STANDBY_MODE 1
#include "config.h"
#define MAXFILENAME 1024
#define MAXLINELENGTH 4096
#define ERRBUFF_SIZE 512
#define DEFAULT_CONFIG_FILE "./repmgr.conf"
@@ -42,19 +42,6 @@
#define DEFAULT_DBNAME "postgres"
#define DEFAULT_REPMGR_SCHEMA_PREFIX "repmgr_"
/* Exit return code */
#define SUCCESS 0
#define ERR_BAD_CONFIG 1
#define ERR_BAD_RSYNC 2
#define ERR_STOP_BACKUP 3
#define ERR_NO_RESTART 4
#define ERR_NEEDS_XLOG 5
#define ERR_DB_CON 6
#define ERR_DB_QUERY 7
#define ERR_PROMOTED 8
#define ERR_BAD_PASSWORD 9
/* Run time options type */
typedef struct
{