NetBSD-Bugs archive

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

lib/60251: getdiskbyname(3) relies on machine-specific declarations / parameters



>Number:         60251
>Category:       lib
>Synopsis:       getdiskbyname(3) relies on machine-specific declarations / parameters
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue May 12 13:20:00 +0000 2026
>Originator:     Jason Thorpe
>Release:        NetBSD 11.99.6
>Organization:
Society for Aspiring Unix Grey-beards
>Environment:
NetBSD virt68k 11.99.6 NetBSD 11.99.6 (GENERIC) #89: Sun May 10 13:22:40 PDT 2026  thorpej@the-ripe-vessel:/home/nbsd/src/sys/arch/virt68k/compile/GENERIC virt68k

>Description:
getdiskbyname(3) relies on a fixed MAXPARTITIONS from <machine/disklabel.h> and is a barrier to a unified m68k user-land.

(It exists at all, really, but that's a different problem.)
>How-To-Repeat:
Attempt a build with a neutered <machine/disklabel.h>.
>Fix:
<sys/disklabel.h> should be changed to have a flexible array if MAXPARTITIONS is not defined, and getdiskbyname() should get the max partitions value from the running kernel and dynamically allocate storage for the singleton.




Home | Main Index | Thread Index | Old Index