cmd: update to use new object system
This commit is contained in:
@@ -318,7 +318,7 @@ static b_status parse_short_opt(struct argv_parser *parser)
|
||||
}
|
||||
|
||||
if (!opt) {
|
||||
struct b_string *usage = z__b_command_default_usage_string(
|
||||
b_string *usage = z__b_command_default_usage_string(
|
||||
parser->cmd, NULL, parser->arglist);
|
||||
b_err("unrecognised argument '" F_YELLOW "-%c" F_RESET
|
||||
"'\n\n",
|
||||
@@ -326,7 +326,7 @@ static b_status parse_short_opt(struct argv_parser *parser)
|
||||
b_i("usage: %s", b_string_ptr(usage));
|
||||
b_i("for more information, use '" F_YELLOW
|
||||
"--help" F_RESET "'\n");
|
||||
b_string_release(usage);
|
||||
b_string_unref(usage);
|
||||
|
||||
return B_ERR_NO_ENTRY;
|
||||
}
|
||||
@@ -456,13 +456,13 @@ static b_status parse_long_opt(struct argv_parser *parser)
|
||||
}
|
||||
|
||||
if (!opt && !subcmd) {
|
||||
struct b_string *usage = z__b_command_default_usage_string(
|
||||
b_string *usage = z__b_command_default_usage_string(
|
||||
parser->cmd, NULL, parser->arglist);
|
||||
b_err("unrecognised argument '" F_YELLOW "--%s" F_RESET
|
||||
"'\n\nusage: %s\n\nfor more information, use '" F_YELLOW
|
||||
"--help" F_RESET "'\n",
|
||||
opt_name, b_string_ptr(usage));
|
||||
b_string_release(usage);
|
||||
b_string_unref(usage);
|
||||
|
||||
return B_ERR_NO_ENTRY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user