| Summary: | an interesting bug in the 3.x series' new i386 bootloader | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Zahemszky Gabor <zgabor> |
| Component: | conf | Assignee: | rnordier |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.2-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->rnordier Assuming that the originator means src/sys/boot/common/pnp.c and not src/sys/i386/boot/common/pnp.c, it's fixed in CURRENT but not STABLE. I'm assigning this to Robert as an MFC reminder. State Changed From-To: open->closed Fixed in -stable: rev 1.7.2.1 of src/sys/boot/common/pnp.c. Thanks for the PR. |
In the file: /usr/src/sys/i386/boot/common/pnp.c, in the pnp_reload function, at line 108, there is a bug: (by the way, this file hasn't got any version info, it's on my 3.2-R i386 machine) the function has only one parameter: the filename, (char *) fname; from which file we need to reload some information. In the function, there are three pnp_readconf() calls, the first two are with constant strings ("/boot/xxx1", and "/boot/xxx2" - I cannot remember), and the third, with the parameter: pnp_readconf( fname ). But in the file, there is: pnp_readconf( "fname" ). --------------^-----^ So with it, we cannot use another config file, as the code tested that name: "fname". (But on the error report, it reports the normal filename - fname.) Fix: substitute "fname" with fname :-) f"x;x (a'la vi) By, Gabor Zahemszky ZGabor at CoDe dot HU ----- #!/bin/ksh Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z ;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X" How-To-Repeat: vi /usr/src/sys/i386/boot/common/pnp.c 108G