[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] cryptodisk: allow user to retry failed passphrase
From: |
Forest |
Subject: |
Re: [PATCH v4] cryptodisk: allow user to retry failed passphrase |
Date: |
Mon, 06 May 2024 15:33:28 -0700 |
On Mon, 6 May 2024 20:22:48 +0200, Daniel Kiper wrote:
>You can make this check much simpler. Please take a look at the commit
>ac8a37dda (net/http: Allow use of non-standard TCP/IP ports).
I did it that way in order to preserve a feature of Glenn's suggested
approach: passing through any grub_errno value set by grub_strtoul().
(I merely added an additional case to update grub_errno if and only if we
generate an error of our own.)
Now that you mention it, though, I suppose it's okay to overwrite
grub_strtoul's errno values as long as the replacement values are sensible.
That function's logic seems unlikely to change in the future, after all, and
we're validating the string more strictly than it does.
>In case of an error here I would assume default value. I think this
>behavior should be documented then.
Yes, that makes sense, and would simplify the code a bit.
I'll do that in the next rev.