tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 9.99.100 fallout: bootloader and modules




> On Sep 21, 2022, at 5:00 AM, Johnny Billquist <bqt%softjar.se@localhost> wrote:
> 
> Searching for uses of netbsd_version, there is some more broken logic in a few places, following similar patterns or assumptions.
> 
> Like in /usr/src/sys/arch/i386/stand/lib/exec.c:
> 
>        if (netbsd_version / 1000000 % 100 == 99) {
>                /* -current */
>                snprintf(buf, bufsize,
>                    "/stand/%s/%d.%d.%d/modules", machine,
>                    netbsd_version / 100000000,
>                    netbsd_version / 1000000 % 100,
>                    netbsd_version / 100 % 100);
>        } else if (netbsd_version != 0) {
>                /* release */
>                snprintf(buf, bufsize,
>                    "/stand/%s/%d.%d/modules", machine,
>                    netbsd_version / 100000000,
>                    netbsd_version / 1000000 % 100);
>        }
> 
> 
> So just changing the modulo in the place you were suggesting isn't enough. :-P

Obviously we need a function in libsa or libkern for this.

-- thorpej



Home | Main Index | Thread Index | Old Index