int alertif_too_many_args_idx(int maxarg, int index, const char *file, int linenum, char **args, int *err_code);
int alertif_too_many_args(int maxarg, const char *file, int linenum, char **args, int *err_code);
int parse_process_number(const char *arg, unsigned long *proc, int max, int *autoinc, char **err);
-unsigned long parse_cpu_set(const char **args, struct hap_cpuset *cpu_set, char **err);
+int parse_cpu_set(const char **args, struct hap_cpuset *cpu_set, char **err);
void free_email_alert(struct proxy *p);
const char *cfg_find_best_match(const char *word, const struct list *list, int section, const char **extra);
int warnifnotcap(struct proxy *proxy, int cap, const char *file, int line, const char *arg, const char *hint);
* distinct argument in <args>. On success, it returns 0, otherwise it returns
* 1 with an error message in <err>.
*/
-unsigned long parse_cpu_set(const char **args, struct hap_cpuset *cpu_set, char **err)
+int parse_cpu_set(const char **args, struct hap_cpuset *cpu_set, char **err)
{
int cur_arg = 0;
const char *arg;
if (!isdigit((unsigned char)*args[cur_arg])) {
memprintf(err, "'%s' is not a CPU range.", arg);
- return -1;
+ return 1;
}
low = high = str2uic(arg);
parse_cpu_set_args[0] = trash.area;
parse_cpu_set_args[1] = "\0";
- if (parse_cpu_set(parse_cpu_set_args, &active_cpus, &err)) {
+ if (parse_cpu_set(parse_cpu_set_args, &active_cpus, &err) != 0) {
ha_notice("Cannot read online CPUs list: '%s'. Will not try to refine binding\n", err);
free(err);
goto free_scandir_entries;