grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Forest <forestix@nom.one>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: grub-devel@gnu.org, Glenn Washburn <development@efficientek.com>
Subject: Re: [PATCH v4] cryptodisk: allow user to retry failed passphrase
Date: Mon, 06 May 2024 15:33:28 -0700	[thread overview]
Message-ID: <jgli3jhi8jod8bid4103i32bs7rr4k4at1@sonic.net> (raw)
In-Reply-To: <Zjkf+K3YdhuspsfM@tomti.i.net-space.pl>

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.

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

      reply	other threads:[~2024-05-06 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28  0:48 [PATCH v4] cryptodisk: allow user to retry failed passphrase Forest
2024-05-01  3:59 ` Glenn Washburn
2024-05-03 17:16 ` Maximilian Stendler
2024-05-06 18:22 ` Daniel Kiper via Grub-devel
2024-05-06 22:33   ` Forest [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jgli3jhi8jod8bid4103i32bs7rr4k4at1@sonic.net \
    --to=forestix@nom.one \
    --cc=daniel.kiper@oracle.com \
    --cc=development@efficientek.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).