From owner-freebsd-arch Fri Mar 8 21: 8:39 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id E8B9037B404 for ; Fri, 8 Mar 2002 21:08:35 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id QAA09438; Sat, 9 Mar 2002 16:08:12 +1100 Date: Sat, 9 Mar 2002 16:08:57 +1100 (EST) From: Bruce Evans X-X-Sender: To: Poul-Henning Kamp Cc: Luigi Rizzo , Garance A Drosihn , Subject: Re: Proposed patch: kern.bootdev* sysctl variables In-Reply-To: <48207.1015613509@critter.freebsd.dk> Message-ID: <20020309155205.T4263-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 8 Mar 2002, Poul-Henning Kamp wrote: > In message <20020308102656.A9076@iguana.icir.org>, Luigi Rizzo writes: > >you can get the correct major/minor numbers for the device > >from kern/bootdev: > > > > # sysctl kern.bootdev > > kern.bootdev: 2687500318 > > > >but the mapping to names of course is totally user-dependent. > > Uhm devname(3) ? No. kern.bootdev (if it actually a copy of the boot variable) is not a udev_t: u_long bootdev = 0; /* not a dev_t - encoding is different */ E.g., 2687500318 is 0xA030001E; see and old versions of i386/autoconf.c for how to decode this correctly. I still use my version of the old versions because I don't use /boot/loader and boot device handling has regressed since FreeBSD-2 if /boot/loader is not used. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message