On Fri, Nov 21, 2025 at 11:50:52AM +0200, Radoslav Kolev via Grub-devel wrote:
> This can be especially helpful, as the Fedora version of the blscfg
> actually made use of arguments. In case of old configs/scripts the
> new implementation will now error out instead of falling back to
> defaults silently.
>
> Signed-off-by: Radoslav Kolev <[email protected]>
> ---
>  grub-core/commands/blsuki.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/grub-core/commands/blsuki.c b/grub-core/commands/blsuki.c
> index 0fd4458e6..9911bcbe8 100644
> --- a/grub-core/commands/blsuki.c
> +++ b/grub-core/commands/blsuki.c
> @@ -1409,7 +1409,7 @@ blsuki_create_entries (bool show_default, bool 
> show_non_default, char *entry_id,
>  }
>
>  static grub_err_t
> -blsuki_cmd (grub_extcmd_context_t ctxt, enum blsuki_cmd_type cmd_type)
> +blsuki_cmd (grub_extcmd_context_t ctxt, int argc, enum blsuki_cmd_type 
> cmd_type)
>  {
>    grub_err_t err;
>    struct grub_arg_list *state = ctxt->state;
> @@ -1420,6 +1420,8 @@ blsuki_cmd (grub_extcmd_context_t ctxt, enum 
> blsuki_cmd_type cmd_type)
>    bool show_non_default = false;
>    bool all = true;
>    entries = NULL;
> +  if (argc != 0)
> +    return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no arguments expected, see 
> --help"));

Please check this in the caller instead of callee.

Other patches LGTM. Though I think patch #1 should have at least one
sentence of explanation what has to be fixed. Otherwise it is not
obvious at first sight what is going on there...

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to