Skip to content

Commit

Permalink
Reorder CMD_DEBUG_LEVEL processing to match definition order
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrojnar committed Jan 8, 2025
1 parent 4852910 commit dba1add
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/eng_back.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,6 @@ int ctx_engine_ctrl(ENGINE_CTX *ctx, int cmd, long i, void *p, void (*f)())
return ctx_ctrl_set_module(ctx, (const char *)p);
case CMD_PIN:
return ctx_ctrl_set_pin(ctx, (const char *)p);
case CMD_DEBUG_LEVEL:
return ctx_ctrl_set_debug_level(ctx, (int)i);
case CMD_VERBOSE:
return ctx_ctrl_set_debug_level(ctx, 7);
case CMD_QUIET:
Expand All @@ -1222,6 +1220,8 @@ int ctx_engine_ctrl(ENGINE_CTX *ctx, int cmd, long i, void *p, void (*f)())
return ctx_enumerate_slots(ctx);
case CMD_VLOG_A:
return ctx_ctrl_set_vlog(ctx, p);
case CMD_DEBUG_LEVEL:
return ctx_ctrl_set_debug_level(ctx, (int)i);
default:
ENGerr(ENG_F_CTX_ENGINE_CTRL, ENG_R_UNKNOWN_COMMAND);
break;
Expand Down
8 changes: 4 additions & 4 deletions src/eng_front.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ static const ENGINE_CMD_DEFN engine_cmd_defns[] = {
"PIN",
"Specifies the pin code",
ENGINE_CMD_FLAG_STRING},
{CMD_DEBUG_LEVEL,
"DEBUG_LEVEL",
"Set the debug level: 0=emerg, 1=alert, 2=crit, 3=err, 4=warning, 5=notice (default), 6=info, 7=debug",
ENGINE_CMD_FLAG_NUMERIC},
{CMD_VERBOSE,
"VERBOSE",
"Print additional details",
Expand Down Expand Up @@ -88,6 +84,10 @@ static const ENGINE_CMD_DEFN engine_cmd_defns[] = {
"VLOG_A",
"Set the logging callback",
ENGINE_CMD_FLAG_INTERNAL},
{CMD_DEBUG_LEVEL,
"DEBUG_LEVEL",
"Set the debug level: 0=emerg, 1=alert, 2=crit, 3=err, 4=warning, 5=notice (default), 6=info, 7=debug",
ENGINE_CMD_FLAG_NUMERIC},
{0, NULL, NULL, 0}
};

Expand Down

0 comments on commit dba1add

Please sign in to comment.