Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2002 16:08:57 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Luigi Rizzo <rizzo@icir.org>, Garance A Drosihn <drosih@rpi.edu>, <arch@FreeBSD.ORG>
Subject:   Re: Proposed patch: kern.bootdev* sysctl variables 
Message-ID:  <20020309155205.T4263-100000@gamplex.bde.org>
In-Reply-To: <48207.1015613509@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/reboot.h> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020309155205.T4263-100000>