Subject: Re: Empty bootargs ....
To: None <port-powerpc@NetBSD.ORG, cagney@tpgi.com.au>
From: Wolfgang Solfrank <ws@kurt.tools.de>
List: port-powerpc
Date: 12/19/1996 17:21:01
> I've been trying to run the NetBSD kernel without using the boot.ppc
> loader (for me it is just easier :-). In doing this, I wasn't passing
> any bootargs (oops). Any way, I noticed the following:
>
> o In autoconf.c:setroot() there is an unsafe loop:
>
> for (cp = bootpath + strlen(bootpath); --cp >= bootpath;) {
>
> vs
>
> for (cp = bootpath + strlen(bootpath) + 1; --cp >= bootpath;) {
Hmm, arguably this isn't unsafe, as the boot code guarrantees that the
arguments are not empty.
> o The size argument (r7?) should probably be passed into
> the function machdep.c:initppc(). That function in turn
> doing some sort of sanity check.
Again, the boot code guarrantees that the argument string is indeed one string,
so this isn't necessary either.
Ciao,
Wolfgang
--
ws@TooLs.DE (Wolfgang Solfrank, TooLs GmbH) +49-228-985800