Subject: Re: root= vs. boodev=
To: None <port-xen@NetBSD.org>
From: Pavel Cahyna <pavel@NetBSD.org>
List: port-xen
Date: 06/28/2007 22:06:18
On Mon, Jun 18, 2007 at 04:34:50PM +0200, Manuel Bouyer wrote:
> On Sun, Jun 17, 2007 at 10:42:19PM +0200, Pavel Cahyna wrote:
> > > it's 'bootdev='
> >
> > our multiboot support also uses root= . Could NetBSD/Xen support this for
> > consistency?
>
> Yes, it's easy:
> --- xen_machdep.c 22 Jan 2006 20:15:51 -0000 1.16
> +++ xen_machdep.c 18 Jun 2007 14:34:10 -0000
> @@ -187,7 +187,8 @@
>
> switch (what) {
> case XEN_PARSE_BOOTDEV:
> - if (strncasecmp(opt, "bootdev=", 8) == 0)
> + if (strncasecmp(opt, "bootdev=", 8) == 0 ||
> + strncasecmp(opt, "root=", 5) == 0)
> strncpy(xcp->xcp_bootdev, opt + 8,
Shouldn't this be 5 for the second case?
> sizeof(xcp->xcp_bootdev));
> break;