grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/3] grub: Make grub_envblk_iterate() return an int


From: Daniel Kiper
Subject: Re: [PATCH v2 2/3] grub: Make grub_envblk_iterate() return an int
Date: Wed, 16 Jan 2019 22:50:47 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Jan 16, 2019 at 01:34:42PM -0500, Prarit Bhargava wrote:
> grub_envblk_iterate() is a void.  Future functions will require the
> ability to interpret return codes from the iteration, so
> grub_envblk_iterate() should be an int.
>
> The value of 0 returned from the hook functions is overloaded and cannot
> be parsed by callers to grub_envblk_iterate() for error handling.  To fix
> this add GRUB_ERR_ITERATE_STOP and GRUB_ERR_ITERATE_CONTINUE to the error
> returns so the iteration can be stopped and continued respectively.
>
> Make grub_envblk_iterate() return an int.
>
> Signed-off-by: Prarit Bhargava <address@hidden>

I do not like this patch. First of all GRUB errors are defined as an enum
not as an int. The second: do not add error codes if they are not really
needed. And yours are not needed at all.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]