Date: Mon, 25 Feb 2002 14:30:13 -0800 From: Luigi Rizzo <rizzo@icir.org> To: hackers@freebsd.org Subject: bootinfo not reporting boot slice ? Message-ID: <20020225143013.A96117@iguana.icir.org>
next in thread | raw e-mail | index | archive | help
[bcc-ed to some recent committers to boot2.c] Hi, for some stuff I am doing with picobsd (and i think in general this is useful) it would be nice to know where the kernel was loaded from. In /sys/boot/i386/boot2/boot2.c this information is stored in three 8-bit variables: dsk.drive also goes into bootinfo.bi_bios_dev dsk.slice dsk.part Although the latter two are not made available to the kernel, there are two empty 8-bit fields in struct bootinfo u_int8_t bi_pad[2]; which could do the job without breaking binary compatibility. Any objection on exporting dsk.slice and dsk.part into the bi_pad fields, possibly starting from 1 so the kernel can tell an uninitialized value from a good one ? (and together with this, perhaps a sysctl variable which builds a device name from these three values...) cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020225143013.A96117>