mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Allow command/option constants to autonumber in both C and Perl to reduce churn when a new command/option is added.
This commit is contained in:
parent
4c3cf435c0
commit
77dca5b968
@ -181,14 +181,14 @@ sub buildConfig
|
||||
my $iOptionIndexTotal = $rhConfigDefine->{$strOption}{&CFGDEF_INDEX_TOTAL};
|
||||
my $strOptionPrefix = $rhConfigDefine->{$strOption}{&CFGDEF_PREFIX};
|
||||
|
||||
# Build C enum
|
||||
my $strOptionEnum = buildConfigOptionEnum($strOption);
|
||||
push(@{$rhEnum->{&BLD_LIST}}, $strOptionEnum);
|
||||
$rhEnum->{&BLD_VALUE}{$strOptionEnum} = $iOptionTotal;
|
||||
|
||||
# Builds option data
|
||||
for (my $iOptionIndex = 1; $iOptionIndex <= $iOptionIndexTotal; $iOptionIndex++)
|
||||
{
|
||||
# Build C enum
|
||||
my $strOptionEnum = buildConfigOptionEnum($strOption) . ($iOptionIndex == 1 ? '' : $iOptionIndex);
|
||||
push(@{$rhEnum->{&BLD_LIST}}, $strOptionEnum);
|
||||
$rhEnum->{&BLD_VALUE}{$strOptionEnum} = $iOptionTotal;
|
||||
|
||||
# Create the indexed version of the option name
|
||||
my $strOptionIndex = defined($strOptionPrefix) ?
|
||||
"${strOptionPrefix}${iOptionIndex}-" . substr($strOption, length($strOptionPrefix) + 1) : $strOption;
|
||||
@ -203,9 +203,9 @@ sub buildConfig
|
||||
" CONFIG_OPTION_INDEX(" . ($iOptionIndex - 1) . ")\n" .
|
||||
" CONFIG_OPTION_DEFINE_ID(" . buildConfigDefineOptionEnum($strOption) . ")\n" .
|
||||
" )\n";
|
||||
}
|
||||
|
||||
$iOptionTotal += $iOptionIndexTotal;
|
||||
$iOptionTotal += 1;
|
||||
}
|
||||
}
|
||||
|
||||
$strBuildSource .=
|
||||
|
@ -155,6 +155,10 @@
|
||||
<p>Do nothing in <code>memContextMove()</code> when the context is already in the specified parent.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Allow command/option constants to autonumber in both C and Perl to reduce churn when a new command/option is added.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Show exact log level required for stack trace param output instead of just <quote>debug</quote>.</p>
|
||||
</release-item>
|
||||
|
@ -26,6 +26,37 @@ our @EXPORT_OK;
|
||||
|
||||
foreach my $strSection (keys(%EXPORT_TAGS))
|
||||
{
|
||||
# Assign values to serial constants like CFGCMD_* and CFGOPT_*. New commands and options (especially options) renumber the list
|
||||
# and cause a lot of churn in the commits. This takes care of the renumbering to cut down on that churn.
|
||||
my $strPrefixLast = 'XXXXXXXX';
|
||||
my $iConstantIdx = 0;
|
||||
|
||||
foreach my $strConstant (@{$EXPORT_TAGS{$strSection}})
|
||||
{
|
||||
my $strPrefix = ($strConstant =~ m/^[A-Z0-9]+/g)[0];
|
||||
|
||||
if (defined($strPrefix))
|
||||
{
|
||||
if ($strPrefix ne $strPrefixLast)
|
||||
{
|
||||
$iConstantIdx = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$iConstantIdx++;
|
||||
}
|
||||
|
||||
if ($strPrefix eq 'CFGCMD' || $strPrefix eq 'CFGOPT')
|
||||
{
|
||||
eval ## no critic (BuiltinFunctions::ProhibitStringyEval, ErrorHandling::RequireCheckingReturnValueOfEval)
|
||||
"use constant ${strConstant} => ${iConstantIdx}";
|
||||
}
|
||||
|
||||
$strPrefixLast = $strPrefix;
|
||||
}
|
||||
}
|
||||
|
||||
# OK to export everything in the tag
|
||||
push(@EXPORT_OK, @{$EXPORT_TAGS{$strSection}});
|
||||
}
|
||||
|
||||
|
@ -47,116 +47,6 @@ sub libcAutoConstant
|
||||
CFGOPTVAL_RESTORE_TYPE_IMMEDIATE => 'immediate',
|
||||
CFGOPTVAL_RESTORE_TYPE_DEFAULT => 'default',
|
||||
|
||||
CFGCMD_ARCHIVE_GET => 0,
|
||||
CFGCMD_ARCHIVE_PUSH => 1,
|
||||
CFGCMD_BACKUP => 2,
|
||||
CFGCMD_CHECK => 3,
|
||||
CFGCMD_EXPIRE => 4,
|
||||
CFGCMD_HELP => 5,
|
||||
CFGCMD_INFO => 6,
|
||||
CFGCMD_LOCAL => 7,
|
||||
CFGCMD_REMOTE => 8,
|
||||
CFGCMD_RESTORE => 9,
|
||||
CFGCMD_STANZA_CREATE => 10,
|
||||
CFGCMD_STANZA_DELETE => 11,
|
||||
CFGCMD_STANZA_UPGRADE => 12,
|
||||
CFGCMD_START => 13,
|
||||
CFGCMD_STOP => 14,
|
||||
CFGCMD_VERSION => 15,
|
||||
|
||||
CFGOPT_ARCHIVE_ASYNC => 0,
|
||||
CFGOPT_ARCHIVE_CHECK => 1,
|
||||
CFGOPT_ARCHIVE_COPY => 2,
|
||||
CFGOPT_ARCHIVE_GET_QUEUE_MAX => 3,
|
||||
CFGOPT_ARCHIVE_PUSH_QUEUE_MAX => 4,
|
||||
CFGOPT_ARCHIVE_TIMEOUT => 5,
|
||||
CFGOPT_BACKUP_STANDBY => 6,
|
||||
CFGOPT_BUFFER_SIZE => 7,
|
||||
CFGOPT_CHECKSUM_PAGE => 8,
|
||||
CFGOPT_CMD_SSH => 9,
|
||||
CFGOPT_COMMAND => 10,
|
||||
CFGOPT_COMPRESS => 11,
|
||||
CFGOPT_COMPRESS_LEVEL => 12,
|
||||
CFGOPT_COMPRESS_LEVEL_NETWORK => 13,
|
||||
CFGOPT_CONFIG => 14,
|
||||
CFGOPT_CONFIG_INCLUDE_PATH => 15,
|
||||
CFGOPT_CONFIG_PATH => 16,
|
||||
CFGOPT_DB_INCLUDE => 17,
|
||||
CFGOPT_DB_TIMEOUT => 18,
|
||||
CFGOPT_DELTA => 19,
|
||||
CFGOPT_FORCE => 20,
|
||||
CFGOPT_HOST_ID => 21,
|
||||
CFGOPT_LINK_ALL => 22,
|
||||
CFGOPT_LINK_MAP => 23,
|
||||
CFGOPT_LOCK_PATH => 24,
|
||||
CFGOPT_LOG_LEVEL_CONSOLE => 25,
|
||||
CFGOPT_LOG_LEVEL_FILE => 26,
|
||||
CFGOPT_LOG_LEVEL_STDERR => 27,
|
||||
CFGOPT_LOG_PATH => 28,
|
||||
CFGOPT_LOG_SUBPROCESS => 29,
|
||||
CFGOPT_LOG_TIMESTAMP => 30,
|
||||
CFGOPT_MANIFEST_SAVE_THRESHOLD => 31,
|
||||
CFGOPT_NEUTRAL_UMASK => 32,
|
||||
CFGOPT_ONLINE => 33,
|
||||
CFGOPT_OUTPUT => 34,
|
||||
CFGOPT_PERL_OPTION => 35,
|
||||
CFGOPT_PG_HOST => 36,
|
||||
CFGOPT_PG_HOST_CMD => 44,
|
||||
CFGOPT_PG_HOST_CONFIG => 52,
|
||||
CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH => 60,
|
||||
CFGOPT_PG_HOST_CONFIG_PATH => 68,
|
||||
CFGOPT_PG_HOST_PORT => 76,
|
||||
CFGOPT_PG_HOST_USER => 84,
|
||||
CFGOPT_PG_PATH => 92,
|
||||
CFGOPT_PG_PORT => 100,
|
||||
CFGOPT_PG_SOCKET_PATH => 108,
|
||||
CFGOPT_PROCESS => 116,
|
||||
CFGOPT_PROCESS_MAX => 117,
|
||||
CFGOPT_PROTOCOL_TIMEOUT => 118,
|
||||
CFGOPT_RECOVERY_OPTION => 119,
|
||||
CFGOPT_REPO_CIPHER_PASS => 120,
|
||||
CFGOPT_REPO_CIPHER_TYPE => 121,
|
||||
CFGOPT_REPO_HARDLINK => 122,
|
||||
CFGOPT_REPO_HOST => 123,
|
||||
CFGOPT_REPO_HOST_CMD => 124,
|
||||
CFGOPT_REPO_HOST_CONFIG => 125,
|
||||
CFGOPT_REPO_HOST_CONFIG_INCLUDE_PATH => 126,
|
||||
CFGOPT_REPO_HOST_CONFIG_PATH => 127,
|
||||
CFGOPT_REPO_HOST_PORT => 128,
|
||||
CFGOPT_REPO_HOST_USER => 129,
|
||||
CFGOPT_REPO_PATH => 130,
|
||||
CFGOPT_REPO_RETENTION_ARCHIVE => 131,
|
||||
CFGOPT_REPO_RETENTION_ARCHIVE_TYPE => 132,
|
||||
CFGOPT_REPO_RETENTION_DIFF => 133,
|
||||
CFGOPT_REPO_RETENTION_FULL => 134,
|
||||
CFGOPT_REPO_S3_BUCKET => 135,
|
||||
CFGOPT_REPO_S3_CA_FILE => 136,
|
||||
CFGOPT_REPO_S3_CA_PATH => 137,
|
||||
CFGOPT_REPO_S3_ENDPOINT => 138,
|
||||
CFGOPT_REPO_S3_HOST => 139,
|
||||
CFGOPT_REPO_S3_KEY => 140,
|
||||
CFGOPT_REPO_S3_KEY_SECRET => 141,
|
||||
CFGOPT_REPO_S3_REGION => 142,
|
||||
CFGOPT_REPO_S3_TOKEN => 143,
|
||||
CFGOPT_REPO_S3_VERIFY_SSL => 144,
|
||||
CFGOPT_REPO_TYPE => 145,
|
||||
CFGOPT_RESUME => 146,
|
||||
CFGOPT_SET => 147,
|
||||
CFGOPT_SPOOL_PATH => 148,
|
||||
CFGOPT_STANZA => 149,
|
||||
CFGOPT_START_FAST => 150,
|
||||
CFGOPT_STOP_AUTO => 151,
|
||||
CFGOPT_TABLESPACE_MAP => 152,
|
||||
CFGOPT_TABLESPACE_MAP_ALL => 153,
|
||||
CFGOPT_TARGET => 154,
|
||||
CFGOPT_TARGET_ACTION => 155,
|
||||
CFGOPT_TARGET_EXCLUSIVE => 156,
|
||||
CFGOPT_TARGET_TIMELINE => 157,
|
||||
CFGOPT_TEST => 158,
|
||||
CFGOPT_TEST_DELAY => 159,
|
||||
CFGOPT_TEST_POINT => 160,
|
||||
CFGOPT_TYPE => 161,
|
||||
|
||||
CFGDEF_TYPE_BOOLEAN => 0,
|
||||
CFGDEF_TYPE_FLOAT => 1,
|
||||
CFGDEF_TYPE_HASH => 2,
|
||||
@ -266,15 +156,85 @@ sub libcAutoExportTag
|
||||
'CFGOPT_OUTPUT',
|
||||
'CFGOPT_PERL_OPTION',
|
||||
'CFGOPT_PG_HOST',
|
||||
'CFGOPT_PG_HOST2',
|
||||
'CFGOPT_PG_HOST3',
|
||||
'CFGOPT_PG_HOST4',
|
||||
'CFGOPT_PG_HOST5',
|
||||
'CFGOPT_PG_HOST6',
|
||||
'CFGOPT_PG_HOST7',
|
||||
'CFGOPT_PG_HOST8',
|
||||
'CFGOPT_PG_HOST_CMD',
|
||||
'CFGOPT_PG_HOST_CMD2',
|
||||
'CFGOPT_PG_HOST_CMD3',
|
||||
'CFGOPT_PG_HOST_CMD4',
|
||||
'CFGOPT_PG_HOST_CMD5',
|
||||
'CFGOPT_PG_HOST_CMD6',
|
||||
'CFGOPT_PG_HOST_CMD7',
|
||||
'CFGOPT_PG_HOST_CMD8',
|
||||
'CFGOPT_PG_HOST_CONFIG',
|
||||
'CFGOPT_PG_HOST_CONFIG2',
|
||||
'CFGOPT_PG_HOST_CONFIG3',
|
||||
'CFGOPT_PG_HOST_CONFIG4',
|
||||
'CFGOPT_PG_HOST_CONFIG5',
|
||||
'CFGOPT_PG_HOST_CONFIG6',
|
||||
'CFGOPT_PG_HOST_CONFIG7',
|
||||
'CFGOPT_PG_HOST_CONFIG8',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH2',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH3',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH4',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH5',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH6',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH7',
|
||||
'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH8',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH2',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH3',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH4',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH5',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH6',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH7',
|
||||
'CFGOPT_PG_HOST_CONFIG_PATH8',
|
||||
'CFGOPT_PG_HOST_PORT',
|
||||
'CFGOPT_PG_HOST_PORT2',
|
||||
'CFGOPT_PG_HOST_PORT3',
|
||||
'CFGOPT_PG_HOST_PORT4',
|
||||
'CFGOPT_PG_HOST_PORT5',
|
||||
'CFGOPT_PG_HOST_PORT6',
|
||||
'CFGOPT_PG_HOST_PORT7',
|
||||
'CFGOPT_PG_HOST_PORT8',
|
||||
'CFGOPT_PG_HOST_USER',
|
||||
'CFGOPT_PG_HOST_USER2',
|
||||
'CFGOPT_PG_HOST_USER3',
|
||||
'CFGOPT_PG_HOST_USER4',
|
||||
'CFGOPT_PG_HOST_USER5',
|
||||
'CFGOPT_PG_HOST_USER6',
|
||||
'CFGOPT_PG_HOST_USER7',
|
||||
'CFGOPT_PG_HOST_USER8',
|
||||
'CFGOPT_PG_PATH',
|
||||
'CFGOPT_PG_PATH2',
|
||||
'CFGOPT_PG_PATH3',
|
||||
'CFGOPT_PG_PATH4',
|
||||
'CFGOPT_PG_PATH5',
|
||||
'CFGOPT_PG_PATH6',
|
||||
'CFGOPT_PG_PATH7',
|
||||
'CFGOPT_PG_PATH8',
|
||||
'CFGOPT_PG_PORT',
|
||||
'CFGOPT_PG_PORT2',
|
||||
'CFGOPT_PG_PORT3',
|
||||
'CFGOPT_PG_PORT4',
|
||||
'CFGOPT_PG_PORT5',
|
||||
'CFGOPT_PG_PORT6',
|
||||
'CFGOPT_PG_PORT7',
|
||||
'CFGOPT_PG_PORT8',
|
||||
'CFGOPT_PG_SOCKET_PATH',
|
||||
'CFGOPT_PG_SOCKET_PATH2',
|
||||
'CFGOPT_PG_SOCKET_PATH3',
|
||||
'CFGOPT_PG_SOCKET_PATH4',
|
||||
'CFGOPT_PG_SOCKET_PATH5',
|
||||
'CFGOPT_PG_SOCKET_PATH6',
|
||||
'CFGOPT_PG_SOCKET_PATH7',
|
||||
'CFGOPT_PG_SOCKET_PATH8',
|
||||
'CFGOPT_PROCESS',
|
||||
'CFGOPT_PROCESS_MAX',
|
||||
'CFGOPT_PROTOCOL_TIMEOUT',
|
||||
|
@ -199,41 +199,31 @@ sub buildXsAll
|
||||
}
|
||||
|
||||
# Generate command constants
|
||||
$strConstantBlock .= defined($strConstantBlock) ? "\n" : '';
|
||||
my $iIndex = 0;
|
||||
|
||||
foreach my $strCommand (cfgDefineCommandList())
|
||||
{
|
||||
my $strConstant = "CFGCMD_" . uc($strCommand);
|
||||
$strConstant =~ s/\-/\_/g;
|
||||
|
||||
$strConstantBlock .=
|
||||
" ${strConstant}" . (' ' x (69 - length($strConstant) - 4)) . "=> $iIndex,\n";
|
||||
push(@{$rhExport->{'config'}{&BLD_EXPORTTYPE_CONSTANT}}, $strConstant);
|
||||
|
||||
$iIndex++;
|
||||
}
|
||||
|
||||
# Generate option constants
|
||||
$strConstantBlock .= defined($strConstantBlock) ? "\n" : '';
|
||||
$iIndex = 0;
|
||||
|
||||
foreach my $strOption (sort(keys(%{$rhConfigDefine})))
|
||||
{
|
||||
# Build Perl constant
|
||||
my $strConstant = "CFGOPT_" . uc($strOption);
|
||||
$strConstant =~ s/\-/\_/g;
|
||||
|
||||
$strConstantBlock .=
|
||||
" ${strConstant}" . (' ' x (69 - length($strConstant) - 4)) . "=> $iIndex,\n";
|
||||
push(@{$rhExport->{'config'}{&BLD_EXPORTTYPE_CONSTANT}}, $strConstant);
|
||||
|
||||
$iIndex += $rhConfigDefine->{$strOption}{&CFGDEF_INDEX_TOTAL};
|
||||
# Builds option data
|
||||
for (my $iOptionIndex = 1; $iOptionIndex <= $rhConfigDefine->{$strOption}{&CFGDEF_INDEX_TOTAL}; $iOptionIndex++)
|
||||
{
|
||||
push(@{$rhExport->{'config'}{&BLD_EXPORTTYPE_CONSTANT}}, $strConstant . ($iOptionIndex == 1 ? '' : $iOptionIndex));
|
||||
}
|
||||
}
|
||||
|
||||
# Generate option type constants
|
||||
$strConstantBlock .= defined($strConstantBlock) ? "\n" : '';
|
||||
$iIndex = 0;
|
||||
my $iIndex = 0;
|
||||
|
||||
foreach my $strOptionType (cfgDefineOptionTypeList())
|
||||
{
|
||||
|
@ -82,16 +82,86 @@ typedef enum
|
||||
cfgOptOutput,
|
||||
cfgOptPerlOption,
|
||||
cfgOptPgHost,
|
||||
cfgOptPgHostCmd = 44,
|
||||
cfgOptPgHostConfig = 52,
|
||||
cfgOptPgHostConfigIncludePath = 60,
|
||||
cfgOptPgHostConfigPath = 68,
|
||||
cfgOptPgHostPort = 76,
|
||||
cfgOptPgHostUser = 84,
|
||||
cfgOptPgPath = 92,
|
||||
cfgOptPgPort = 100,
|
||||
cfgOptPgSocketPath = 108,
|
||||
cfgOptProcess = 116,
|
||||
cfgOptPgHost2,
|
||||
cfgOptPgHost3,
|
||||
cfgOptPgHost4,
|
||||
cfgOptPgHost5,
|
||||
cfgOptPgHost6,
|
||||
cfgOptPgHost7,
|
||||
cfgOptPgHost8,
|
||||
cfgOptPgHostCmd,
|
||||
cfgOptPgHostCmd2,
|
||||
cfgOptPgHostCmd3,
|
||||
cfgOptPgHostCmd4,
|
||||
cfgOptPgHostCmd5,
|
||||
cfgOptPgHostCmd6,
|
||||
cfgOptPgHostCmd7,
|
||||
cfgOptPgHostCmd8,
|
||||
cfgOptPgHostConfig,
|
||||
cfgOptPgHostConfig2,
|
||||
cfgOptPgHostConfig3,
|
||||
cfgOptPgHostConfig4,
|
||||
cfgOptPgHostConfig5,
|
||||
cfgOptPgHostConfig6,
|
||||
cfgOptPgHostConfig7,
|
||||
cfgOptPgHostConfig8,
|
||||
cfgOptPgHostConfigIncludePath,
|
||||
cfgOptPgHostConfigIncludePath2,
|
||||
cfgOptPgHostConfigIncludePath3,
|
||||
cfgOptPgHostConfigIncludePath4,
|
||||
cfgOptPgHostConfigIncludePath5,
|
||||
cfgOptPgHostConfigIncludePath6,
|
||||
cfgOptPgHostConfigIncludePath7,
|
||||
cfgOptPgHostConfigIncludePath8,
|
||||
cfgOptPgHostConfigPath,
|
||||
cfgOptPgHostConfigPath2,
|
||||
cfgOptPgHostConfigPath3,
|
||||
cfgOptPgHostConfigPath4,
|
||||
cfgOptPgHostConfigPath5,
|
||||
cfgOptPgHostConfigPath6,
|
||||
cfgOptPgHostConfigPath7,
|
||||
cfgOptPgHostConfigPath8,
|
||||
cfgOptPgHostPort,
|
||||
cfgOptPgHostPort2,
|
||||
cfgOptPgHostPort3,
|
||||
cfgOptPgHostPort4,
|
||||
cfgOptPgHostPort5,
|
||||
cfgOptPgHostPort6,
|
||||
cfgOptPgHostPort7,
|
||||
cfgOptPgHostPort8,
|
||||
cfgOptPgHostUser,
|
||||
cfgOptPgHostUser2,
|
||||
cfgOptPgHostUser3,
|
||||
cfgOptPgHostUser4,
|
||||
cfgOptPgHostUser5,
|
||||
cfgOptPgHostUser6,
|
||||
cfgOptPgHostUser7,
|
||||
cfgOptPgHostUser8,
|
||||
cfgOptPgPath,
|
||||
cfgOptPgPath2,
|
||||
cfgOptPgPath3,
|
||||
cfgOptPgPath4,
|
||||
cfgOptPgPath5,
|
||||
cfgOptPgPath6,
|
||||
cfgOptPgPath7,
|
||||
cfgOptPgPath8,
|
||||
cfgOptPgPort,
|
||||
cfgOptPgPort2,
|
||||
cfgOptPgPort3,
|
||||
cfgOptPgPort4,
|
||||
cfgOptPgPort5,
|
||||
cfgOptPgPort6,
|
||||
cfgOptPgPort7,
|
||||
cfgOptPgPort8,
|
||||
cfgOptPgSocketPath,
|
||||
cfgOptPgSocketPath2,
|
||||
cfgOptPgSocketPath3,
|
||||
cfgOptPgSocketPath4,
|
||||
cfgOptPgSocketPath5,
|
||||
cfgOptPgSocketPath6,
|
||||
cfgOptPgSocketPath7,
|
||||
cfgOptPgSocketPath8,
|
||||
cfgOptProcess,
|
||||
cfgOptProcessMax,
|
||||
cfgOptProtocolTimeout,
|
||||
cfgOptRecoveryOption,
|
||||
|
@ -10847,6 +10847,35 @@ static const EmbeddedModule embeddedModule[] =
|
||||
"\n"
|
||||
"foreach my $strSection (keys(%EXPORT_TAGS))\n"
|
||||
"{\n"
|
||||
"\n\n"
|
||||
"my $strPrefixLast = 'XXXXXXXX';\n"
|
||||
"my $iConstantIdx = 0;\n"
|
||||
"\n"
|
||||
"foreach my $strConstant (@{$EXPORT_TAGS{$strSection}})\n"
|
||||
"{\n"
|
||||
"my $strPrefix = ($strConstant =~ m/^[A-Z0-9]+/g)[0];\n"
|
||||
"\n"
|
||||
"if (defined($strPrefix))\n"
|
||||
"{\n"
|
||||
"if ($strPrefix ne $strPrefixLast)\n"
|
||||
"{\n"
|
||||
"$iConstantIdx = 0;\n"
|
||||
"}\n"
|
||||
"else\n"
|
||||
"{\n"
|
||||
"$iConstantIdx++;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"if ($strPrefix eq 'CFGCMD' || $strPrefix eq 'CFGOPT')\n"
|
||||
"{\n"
|
||||
"eval\n"
|
||||
"\"use constant ${strConstant} => ${iConstantIdx}\";\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"$strPrefixLast = $strPrefix;\n"
|
||||
"}\n"
|
||||
"}\n"
|
||||
"\n\n"
|
||||
"push(@EXPORT_OK, @{$EXPORT_TAGS{$strSection}});\n"
|
||||
"}\n"
|
||||
"\n\n"
|
||||
@ -10903,116 +10932,6 @@ static const EmbeddedModule embeddedModule[] =
|
||||
"CFGOPTVAL_RESTORE_TYPE_IMMEDIATE => 'immediate',\n"
|
||||
"CFGOPTVAL_RESTORE_TYPE_DEFAULT => 'default',\n"
|
||||
"\n"
|
||||
"CFGCMD_ARCHIVE_GET => 0,\n"
|
||||
"CFGCMD_ARCHIVE_PUSH => 1,\n"
|
||||
"CFGCMD_BACKUP => 2,\n"
|
||||
"CFGCMD_CHECK => 3,\n"
|
||||
"CFGCMD_EXPIRE => 4,\n"
|
||||
"CFGCMD_HELP => 5,\n"
|
||||
"CFGCMD_INFO => 6,\n"
|
||||
"CFGCMD_LOCAL => 7,\n"
|
||||
"CFGCMD_REMOTE => 8,\n"
|
||||
"CFGCMD_RESTORE => 9,\n"
|
||||
"CFGCMD_STANZA_CREATE => 10,\n"
|
||||
"CFGCMD_STANZA_DELETE => 11,\n"
|
||||
"CFGCMD_STANZA_UPGRADE => 12,\n"
|
||||
"CFGCMD_START => 13,\n"
|
||||
"CFGCMD_STOP => 14,\n"
|
||||
"CFGCMD_VERSION => 15,\n"
|
||||
"\n"
|
||||
"CFGOPT_ARCHIVE_ASYNC => 0,\n"
|
||||
"CFGOPT_ARCHIVE_CHECK => 1,\n"
|
||||
"CFGOPT_ARCHIVE_COPY => 2,\n"
|
||||
"CFGOPT_ARCHIVE_GET_QUEUE_MAX => 3,\n"
|
||||
"CFGOPT_ARCHIVE_PUSH_QUEUE_MAX => 4,\n"
|
||||
"CFGOPT_ARCHIVE_TIMEOUT => 5,\n"
|
||||
"CFGOPT_BACKUP_STANDBY => 6,\n"
|
||||
"CFGOPT_BUFFER_SIZE => 7,\n"
|
||||
"CFGOPT_CHECKSUM_PAGE => 8,\n"
|
||||
"CFGOPT_CMD_SSH => 9,\n"
|
||||
"CFGOPT_COMMAND => 10,\n"
|
||||
"CFGOPT_COMPRESS => 11,\n"
|
||||
"CFGOPT_COMPRESS_LEVEL => 12,\n"
|
||||
"CFGOPT_COMPRESS_LEVEL_NETWORK => 13,\n"
|
||||
"CFGOPT_CONFIG => 14,\n"
|
||||
"CFGOPT_CONFIG_INCLUDE_PATH => 15,\n"
|
||||
"CFGOPT_CONFIG_PATH => 16,\n"
|
||||
"CFGOPT_DB_INCLUDE => 17,\n"
|
||||
"CFGOPT_DB_TIMEOUT => 18,\n"
|
||||
"CFGOPT_DELTA => 19,\n"
|
||||
"CFGOPT_FORCE => 20,\n"
|
||||
"CFGOPT_HOST_ID => 21,\n"
|
||||
"CFGOPT_LINK_ALL => 22,\n"
|
||||
"CFGOPT_LINK_MAP => 23,\n"
|
||||
"CFGOPT_LOCK_PATH => 24,\n"
|
||||
"CFGOPT_LOG_LEVEL_CONSOLE => 25,\n"
|
||||
"CFGOPT_LOG_LEVEL_FILE => 26,\n"
|
||||
"CFGOPT_LOG_LEVEL_STDERR => 27,\n"
|
||||
"CFGOPT_LOG_PATH => 28,\n"
|
||||
"CFGOPT_LOG_SUBPROCESS => 29,\n"
|
||||
"CFGOPT_LOG_TIMESTAMP => 30,\n"
|
||||
"CFGOPT_MANIFEST_SAVE_THRESHOLD => 31,\n"
|
||||
"CFGOPT_NEUTRAL_UMASK => 32,\n"
|
||||
"CFGOPT_ONLINE => 33,\n"
|
||||
"CFGOPT_OUTPUT => 34,\n"
|
||||
"CFGOPT_PERL_OPTION => 35,\n"
|
||||
"CFGOPT_PG_HOST => 36,\n"
|
||||
"CFGOPT_PG_HOST_CMD => 44,\n"
|
||||
"CFGOPT_PG_HOST_CONFIG => 52,\n"
|
||||
"CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH => 60,\n"
|
||||
"CFGOPT_PG_HOST_CONFIG_PATH => 68,\n"
|
||||
"CFGOPT_PG_HOST_PORT => 76,\n"
|
||||
"CFGOPT_PG_HOST_USER => 84,\n"
|
||||
"CFGOPT_PG_PATH => 92,\n"
|
||||
"CFGOPT_PG_PORT => 100,\n"
|
||||
"CFGOPT_PG_SOCKET_PATH => 108,\n"
|
||||
"CFGOPT_PROCESS => 116,\n"
|
||||
"CFGOPT_PROCESS_MAX => 117,\n"
|
||||
"CFGOPT_PROTOCOL_TIMEOUT => 118,\n"
|
||||
"CFGOPT_RECOVERY_OPTION => 119,\n"
|
||||
"CFGOPT_REPO_CIPHER_PASS => 120,\n"
|
||||
"CFGOPT_REPO_CIPHER_TYPE => 121,\n"
|
||||
"CFGOPT_REPO_HARDLINK => 122,\n"
|
||||
"CFGOPT_REPO_HOST => 123,\n"
|
||||
"CFGOPT_REPO_HOST_CMD => 124,\n"
|
||||
"CFGOPT_REPO_HOST_CONFIG => 125,\n"
|
||||
"CFGOPT_REPO_HOST_CONFIG_INCLUDE_PATH => 126,\n"
|
||||
"CFGOPT_REPO_HOST_CONFIG_PATH => 127,\n"
|
||||
"CFGOPT_REPO_HOST_PORT => 128,\n"
|
||||
"CFGOPT_REPO_HOST_USER => 129,\n"
|
||||
"CFGOPT_REPO_PATH => 130,\n"
|
||||
"CFGOPT_REPO_RETENTION_ARCHIVE => 131,\n"
|
||||
"CFGOPT_REPO_RETENTION_ARCHIVE_TYPE => 132,\n"
|
||||
"CFGOPT_REPO_RETENTION_DIFF => 133,\n"
|
||||
"CFGOPT_REPO_RETENTION_FULL => 134,\n"
|
||||
"CFGOPT_REPO_S3_BUCKET => 135,\n"
|
||||
"CFGOPT_REPO_S3_CA_FILE => 136,\n"
|
||||
"CFGOPT_REPO_S3_CA_PATH => 137,\n"
|
||||
"CFGOPT_REPO_S3_ENDPOINT => 138,\n"
|
||||
"CFGOPT_REPO_S3_HOST => 139,\n"
|
||||
"CFGOPT_REPO_S3_KEY => 140,\n"
|
||||
"CFGOPT_REPO_S3_KEY_SECRET => 141,\n"
|
||||
"CFGOPT_REPO_S3_REGION => 142,\n"
|
||||
"CFGOPT_REPO_S3_TOKEN => 143,\n"
|
||||
"CFGOPT_REPO_S3_VERIFY_SSL => 144,\n"
|
||||
"CFGOPT_REPO_TYPE => 145,\n"
|
||||
"CFGOPT_RESUME => 146,\n"
|
||||
"CFGOPT_SET => 147,\n"
|
||||
"CFGOPT_SPOOL_PATH => 148,\n"
|
||||
"CFGOPT_STANZA => 149,\n"
|
||||
"CFGOPT_START_FAST => 150,\n"
|
||||
"CFGOPT_STOP_AUTO => 151,\n"
|
||||
"CFGOPT_TABLESPACE_MAP => 152,\n"
|
||||
"CFGOPT_TABLESPACE_MAP_ALL => 153,\n"
|
||||
"CFGOPT_TARGET => 154,\n"
|
||||
"CFGOPT_TARGET_ACTION => 155,\n"
|
||||
"CFGOPT_TARGET_EXCLUSIVE => 156,\n"
|
||||
"CFGOPT_TARGET_TIMELINE => 157,\n"
|
||||
"CFGOPT_TEST => 158,\n"
|
||||
"CFGOPT_TEST_DELAY => 159,\n"
|
||||
"CFGOPT_TEST_POINT => 160,\n"
|
||||
"CFGOPT_TYPE => 161,\n"
|
||||
"\n"
|
||||
"CFGDEF_TYPE_BOOLEAN => 0,\n"
|
||||
"CFGDEF_TYPE_FLOAT => 1,\n"
|
||||
"CFGDEF_TYPE_HASH => 2,\n"
|
||||
@ -11121,15 +11040,85 @@ static const EmbeddedModule embeddedModule[] =
|
||||
"'CFGOPT_OUTPUT',\n"
|
||||
"'CFGOPT_PERL_OPTION',\n"
|
||||
"'CFGOPT_PG_HOST',\n"
|
||||
"'CFGOPT_PG_HOST2',\n"
|
||||
"'CFGOPT_PG_HOST3',\n"
|
||||
"'CFGOPT_PG_HOST4',\n"
|
||||
"'CFGOPT_PG_HOST5',\n"
|
||||
"'CFGOPT_PG_HOST6',\n"
|
||||
"'CFGOPT_PG_HOST7',\n"
|
||||
"'CFGOPT_PG_HOST8',\n"
|
||||
"'CFGOPT_PG_HOST_CMD',\n"
|
||||
"'CFGOPT_PG_HOST_CMD2',\n"
|
||||
"'CFGOPT_PG_HOST_CMD3',\n"
|
||||
"'CFGOPT_PG_HOST_CMD4',\n"
|
||||
"'CFGOPT_PG_HOST_CMD5',\n"
|
||||
"'CFGOPT_PG_HOST_CMD6',\n"
|
||||
"'CFGOPT_PG_HOST_CMD7',\n"
|
||||
"'CFGOPT_PG_HOST_CMD8',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG2',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG3',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG4',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG5',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG6',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG7',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG8',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH2',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH3',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH4',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH5',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH6',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH7',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_INCLUDE_PATH8',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH2',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH3',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH4',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH5',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH6',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH7',\n"
|
||||
"'CFGOPT_PG_HOST_CONFIG_PATH8',\n"
|
||||
"'CFGOPT_PG_HOST_PORT',\n"
|
||||
"'CFGOPT_PG_HOST_PORT2',\n"
|
||||
"'CFGOPT_PG_HOST_PORT3',\n"
|
||||
"'CFGOPT_PG_HOST_PORT4',\n"
|
||||
"'CFGOPT_PG_HOST_PORT5',\n"
|
||||
"'CFGOPT_PG_HOST_PORT6',\n"
|
||||
"'CFGOPT_PG_HOST_PORT7',\n"
|
||||
"'CFGOPT_PG_HOST_PORT8',\n"
|
||||
"'CFGOPT_PG_HOST_USER',\n"
|
||||
"'CFGOPT_PG_HOST_USER2',\n"
|
||||
"'CFGOPT_PG_HOST_USER3',\n"
|
||||
"'CFGOPT_PG_HOST_USER4',\n"
|
||||
"'CFGOPT_PG_HOST_USER5',\n"
|
||||
"'CFGOPT_PG_HOST_USER6',\n"
|
||||
"'CFGOPT_PG_HOST_USER7',\n"
|
||||
"'CFGOPT_PG_HOST_USER8',\n"
|
||||
"'CFGOPT_PG_PATH',\n"
|
||||
"'CFGOPT_PG_PATH2',\n"
|
||||
"'CFGOPT_PG_PATH3',\n"
|
||||
"'CFGOPT_PG_PATH4',\n"
|
||||
"'CFGOPT_PG_PATH5',\n"
|
||||
"'CFGOPT_PG_PATH6',\n"
|
||||
"'CFGOPT_PG_PATH7',\n"
|
||||
"'CFGOPT_PG_PATH8',\n"
|
||||
"'CFGOPT_PG_PORT',\n"
|
||||
"'CFGOPT_PG_PORT2',\n"
|
||||
"'CFGOPT_PG_PORT3',\n"
|
||||
"'CFGOPT_PG_PORT4',\n"
|
||||
"'CFGOPT_PG_PORT5',\n"
|
||||
"'CFGOPT_PG_PORT6',\n"
|
||||
"'CFGOPT_PG_PORT7',\n"
|
||||
"'CFGOPT_PG_PORT8',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH2',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH3',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH4',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH5',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH6',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH7',\n"
|
||||
"'CFGOPT_PG_SOCKET_PATH8',\n"
|
||||
"'CFGOPT_PROCESS',\n"
|
||||
"'CFGOPT_PROCESS_MAX',\n"
|
||||
"'CFGOPT_PROTOCOL_TIMEOUT',\n"
|
||||
|
Loading…
Reference in New Issue
Block a user