mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
suppress warning on silent failure with ECMD_PROCESSED
This commit is contained in:
parent
b2d6cb06c5
commit
50fd61eb8d
@ -236,7 +236,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
|
||||
log_error("No such command '%s'. Try 'help'.",
|
||||
argv[0]);
|
||||
|
||||
if (ret && !error_message_produced()) {
|
||||
if ((ret != ECMD_PROCESSED) && !error_message_produced()) {
|
||||
log_debug("Internal error: Failed command did not use log_error");
|
||||
log_error("Command failed with status code %d.", ret);
|
||||
}
|
||||
|
@ -1099,7 +1099,7 @@ static int _run_script(struct cmd_context *cmd, int argc, char **argv)
|
||||
if (!strcmp(argv[0], "quit") || !strcmp(argv[0], "exit"))
|
||||
break;
|
||||
ret = lvm_run_command(cmd, argc, argv);
|
||||
if (ret) {
|
||||
if (ret != ECMD_PROCESSED) {
|
||||
if (!error_message_produced()) {
|
||||
log_debug("Internal error: Failed command did not use log_error");
|
||||
log_error("Command failed with status code %d.", ret);
|
||||
@ -1227,7 +1227,7 @@ int lvm2_main(int argc, char **argv, unsigned is_static)
|
||||
if (ret == ENO_SUCH_CMD)
|
||||
log_error("No such command. Try 'help'.");
|
||||
|
||||
if (ret && !error_message_produced()) {
|
||||
if ((ret != ECMD_PROCESSED) && !error_message_produced()) {
|
||||
log_debug("Internal error: Failed command did not use log_error");
|
||||
log_error("Command failed with status code %d.", ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user