From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Let user specify OpenBSD root device.
Date: Wed, 26 Aug 2009 02:34:27 +0200 [thread overview]
Message-ID: <20090826003427.GD25183@thorin> (raw)
In-Reply-To: <d7ead6de0908251337x11bd5d3s32ef4fd8d1b5e120@mail.gmail.com>
On Tue, Aug 25, 2009 at 10:37:33PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> + if (cmd->state[OPENBSD_ROOT_ARG].set)
> + {
> + const char *arg = cmd->state[OPENBSD_ROOT_ARG].arg;
> + int unit, part;
> + if (*(arg++) != 'w' || *(arg++) != 'd')
> + return grub_error (GRUB_ERR_BAD_ARGUMENT,
> + "Only device specifications of form "
> + "wd<number><lowercase letter> are supported.");
> +
> + unit = grub_strtoul (arg, (char **) &arg, 10);
> + if (! (arg && *arg >= 'a' && *arg <= 'z'))
> + return grub_error (GRUB_ERR_BAD_ARGUMENT,
> + "Only device specifications of form "
> + "wd<number><letter> are supported.");
Looks like the first error string could be used for both cases, saving
a few bytes.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
next prev parent reply other threads:[~2009-08-26 0:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 20:37 [PATCH] Let user specify OpenBSD root device Vladimir 'phcoder' Serbinenko
2009-08-26 0:34 ` Robert Millan [this message]
2009-08-26 0:39 ` Vladimir 'phcoder' Serbinenko
2009-10-16 11:00 ` Vladimir 'phcoder' Serbinenko
2009-10-16 18:31 ` Robert Millan
2009-10-16 20:21 ` Vladimir 'phcoder' Serbinenko
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=20090826003427.GD25183@thorin \
--to=rmh@aybabtu.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