[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use extcmd to handle bsd arguments.
From: |
Robert Millan |
Subject: |
Re: [PATCH] Use extcmd to handle bsd arguments. |
Date: |
Sun, 23 Aug 2009 12:53:30 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sat, Aug 22, 2009 at 02:22:24PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> Hello. Currently bsd loaders inspects argv[1] for boot options but the
> treat argv[1] as if it always was prefixed by dash ('-') and
> completely ignores options in argv[n], n>1. This leads to unexpected
> results like
> freebsd /kernel verbose
> is parsed like verbose ('v'), dfltroot ('r') and single ('s')
> freebsd /kernel -v -s
> is parsed only like verbose and not verbose and single.
> Additionally help shows no information about these options. This patch
> delegates option parsing to lib/arg.c and so achieves good option
> passing, GNU-style options support and provides help. Unfortunately
> booting with some options has no noticeable effect so I couldn't
> document what they do
Please go ahead (I assume you've tested it on the 3 *BSD kernels).
Btw, you capitalized two of the "Load kernel of ..." messages but not the
NetBSD one:
> + cmd_freebsd = grub_register_extcmd ("freebsd", grub_cmd_freebsd,
> + GRUB_COMMAND_FLAG_BOTH,
> + "freebsd FILE", "Load kernel of FreeBSD.",
> + freebsd_opts);
> + cmd_openbsd = grub_register_extcmd ("openbsd", grub_cmd_openbsd,
> + GRUB_COMMAND_FLAG_BOTH,
> + "openbsd FILE", "Load kernel of OpenBSD.",
> + openbsd_opts);
> + cmd_netbsd = grub_register_extcmd ("netbsd", grub_cmd_netbsd,
> + GRUB_COMMAND_FLAG_BOTH,
> + "netbsd FILE", "load kernel of NetBSD",
> + netbsd_opts);
--
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."