对于bin、tools部分代码的注释 #32
|
|
@ -72,7 +72,7 @@ void _PG_init(void)
|
|||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
// Define common Boolean variables
|
||||
DefineCustomBoolVariable("auto_explain.log_analyze",
|
||||
"Use EXPLAIN ANALYZE for plan logging.",
|
||||
NULL,
|
||||
|
|
@ -84,6 +84,7 @@ void _PG_init(void)
|
|||
NULL,
|
||||
NULL);
|
||||
|
||||
// Define common Boolean variables of auto_explain.log_verbose
|
||||
DefineCustomBoolVariable("auto_explain.log_verbose",
|
||||
"Use EXPLAIN VERBOSE for plan logging.",
|
||||
NULL,
|
||||
|
|
@ -95,6 +96,7 @@ void _PG_init(void)
|
|||
NULL,
|
||||
NULL);
|
||||
|
||||
// Define common Boolean variables of auto_explain.log_buffers
|
||||
DefineCustomBoolVariable("auto_explain.log_buffers",
|
||||
"Log buffers usage.",
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -827,7 +827,7 @@ static int check_cpuset_value_valid(char* cpuset)
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// check the value
|
||||
if ((a < 0) || (b < 0) || (a > b) || (b >= cgutil_cpucnt)) {
|
||||
fprintf(stderr, "ERROR: please specify the cpuset with a valid value.\n");
|
||||
return -1;
|
||||
|
|
@ -845,6 +845,7 @@ static int check_cpuset_value_valid(char* cpuset)
|
|||
* @Return: 1: OK 0: Not OK
|
||||
* @See also:
|
||||
*/
|
||||
// check configuration
|
||||
static int check_config_flag(void)
|
||||
{
|
||||
if (cgutil_opt.cflag || (cgutil_opt.dflag && (*cgutil_opt.clsname || *cgutil_opt.nodegroup)) || cgutil_opt.uflag ||
|
||||
|
|
@ -861,6 +862,7 @@ static int check_config_flag(void)
|
|||
* @Return: -1: abnormal 0: normal
|
||||
* @See also:
|
||||
*/
|
||||
// initialize the configuration
|
||||
static int initialize_cgroup_config(void)
|
||||
{
|
||||
char* hpath = NULL;
|
||||
|
|
@ -907,6 +909,7 @@ static int initialize_cgroup_config(void)
|
|||
* @Return: -1: abnormal 0: normal
|
||||
* @See also:
|
||||
*/
|
||||
// check the configuration status
|
||||
static int check_and_get_group_percent(char* percent, char* gtype)
|
||||
{
|
||||
char* bad = NULL;
|
||||
|
|
@ -943,6 +946,7 @@ static int check_and_get_group_percent(char* percent, char* gtype)
|
|||
* -1: abnormal
|
||||
* 0: normal
|
||||
*/
|
||||
// structure of long options
|
||||
static struct option long_options[] = {{"help", no_argument, NULL, 'h'},
|
||||
{"version", no_argument, NULL, 'V'},
|
||||
{"abort", no_argument, NULL, 'a'},
|
||||
|
|
@ -956,6 +960,7 @@ static struct option long_options[] = {{"help", no_argument, NULL, 'h'},
|
|||
{"rename", no_argument, NULL, 7},
|
||||
{NULL, 0, NULL, 0}};
|
||||
|
||||
// match the choice
|
||||
static int parse_options(int argc, char** argv)
|
||||
{
|
||||
int c;
|
||||
|
|
@ -1166,7 +1171,7 @@ int main(int argc, char** argv)
|
|||
" or \"/sys/devices/system\" is acceptable. \n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// set the style of string
|
||||
int rc = sprintf_s(cgutil_allset, sizeof(cgutil_allset), "%d-%d", 0, cgutil_cpucnt - 1);
|
||||
securec_check_intval(rc, , -1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue