return lv_props[i].lvp_enum;
}
- log_error("Parsing command defs: unknown lv property %s", str);
+ log_error("Parsing command defs: unknown lv property %s.", str);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return LVP_NONE;
}
return lv_types[i].lvt_enum;
}
- log_error("Parsing command defs: unknown lv type %s", str);
+ log_error("Parsing command defs: unknown lv type %s.", str);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return LVT_NONE;
}
return 1;
if ((str[0] == '-') && (str[1] != '-'))
- log_error("Parsing command defs: options must be specified in long form: %s", str);
+ log_error("Parsing command defs: options must be specified in long form: %s.", str);
return 0;
}
val_enum = val_str_to_num(name);
if (!val_enum) {
- log_error("Parsing command defs: unknown pos arg: %s", name);
+ log_error("Parsing command defs: unknown pos arg: %s.", name);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
val_enum = conststr_VAL;
else {
- log_error("Parsing command defs: unknown opt arg: %s", name);
+ log_error("Parsing command defs: unknown opt arg: %s.", name);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
if ((colon = strchr(oo->name, ':')))
*colon = '\0';
else {
- log_error("Parsing command defs: invalid OO definition");
+ log_error("Parsing command defs: invalid OO definition.");
return;
}
len = strlen(old_line) + strlen(new_line) + 2;
line = dm_malloc(len);
if (!line) {
- log_error("Parsing command defs: no memory");
+ log_error("Parsing command defs: no memory.");
return;
}
int line_argc;
if (!(oo_line = get_oo_line(str))) {
- log_error("Parsing command defs: no OO line found for %s", str);
+ log_error("Parsing command defs: no OO line found for %s.", str);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
if (!strcmp(str, "..."))
def->flags |= ARG_DEF_FLAG_MAY_REPEAT;
else {
- log_error("Parsing command defs: unknown pos arg: %s", str);
+ log_error("Parsing command defs: unknown pos arg: %s.", str);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
else if (takes_arg)
update_prev_opt_arg(cmd, argv[i], OPTIONAL);
else {
- log_error("Parsing command defs: can't parse argc %d argv %s prev %s",
+ log_error("Parsing command defs: can't parse argc %d argv %s prev %s.",
i, argv[i], argv[i-1]);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
else if (takes_arg)
update_prev_opt_arg(cmd, argv[i], IGNORE);
else {
- log_error("Parsing command defs: can't parse argc %d argv %s prev %s",
+ log_error("Parsing command defs: can't parse argc %d argv %s prev %s.",
i, argv[i], argv[i-1]);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
else if (takes_arg)
update_prev_opt_arg(cmd, argv[i], REQUIRED);
else {
- log_error("Parsing command defs: can't parse argc %d argv %s prev %s",
+ log_error("Parsing command defs: can't parse argc %d argv %s prev %s.",
i, argv[i], argv[i-1]);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
int line_argc;
if (!(oo_line = get_oo_line(str))) {
- log_error("Parsing command defs: no OO line found for %s", str);
+ log_error("Parsing command defs: no OO line found for %s.", str);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
/* set property for previous required_pos_arg */
update_prev_pos_arg(cmd, argv[i], REQUIRED);
} else {
- log_error("Parsing command defs: can't parse argc %d argv %s prev %s",
+ log_error("Parsing command defs: can't parse argc %d argv %s prev %s.",
i, argv[i], argv[i-1]);
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
int check = 0;
if (cmd->rule_count == CMD_MAX_RULES) {
- log_error("Parsing command defs: too many rules for cmd");
+ log_error("Parsing command defs: too many rules for cmd.");
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
else if (!strncmp(arg, "--", 2)) {
if (!rule->opts) {
if (!(rule->opts = dm_malloc(MAX_RULE_OPTS * sizeof(int)))) {
- log_error("Parsing command defs: no mem");
+ log_error("Parsing command defs: no mem.");
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
if (!rule->check_opts) {
if (!(rule->check_opts = dm_malloc(MAX_RULE_OPTS * sizeof(int)))) {
- log_error("Parsing command defs: no mem");
+ log_error("Parsing command defs: no mem.");
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}
}
if (!skip)
- log_error("Parsing command defs: can't process input line %s", line_orig);
+ log_error("Parsing command defs: can't process input line %s.", line_orig);
}
for (i = 0; i < COMMAND_COUNT; i++) {
buf[bi++] = desc[di];
if (bi == DESC_LINE) {
- log_error("Parsing command defs: print_man_option_desc line too long");
+ log_error("Parsing command defs: print_man_option_desc line too long.");
exit(EXIT_FAILURE);
}
}
if (!primary && !secondary) {
- log_error("Usage: %s --primary|--secondary <command> [/path/to/description-file]", argv[0]);
+ log_error("Usage: %s --primary|--secondary <command> [/path/to/description-file].", argv[0]);
exit(EXIT_FAILURE);
}
if (optind < argc)
cmdname = strdup(argv[optind++]);
else {
- log_error("Missing command name");
+ log_error("Missing command name.");
exit(EXIT_FAILURE);
}