NetBSD Problem Report #60251
From www@netbsd.org Tue May 12 13:19:56 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 791241A9239
for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 May 2026 13:19:56 +0000 (UTC)
Message-Id: <20260512131955.95A5F1A923E@mollari.NetBSD.org>
Date: Tue, 12 May 2026 13:19:55 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: getdiskbyname(3) relies on machine-specific declarations / parameters
X-Send-Pr-Version: www-1.0
X-From4GNATS: "thorpej@me.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60251
>Category: lib
>Synopsis: getdiskbyname(3) relies on machine-specific declarations / parameters
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: thorpej
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue May 12 13:20:00 +0000 2026
>Last-Modified: Tue May 12 13:48:05 +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.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: lib-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Tue, 12 May 2026 13:48:05 +0000
Responsible-Changed-Why:
Take.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.