Subject: Re: patch rfc: "host tools" disklabel, fdisk
To: None <tech-toolchain@netbsd.org>
From: Christos Zoulas <christos@tac.gw.com>
List: tech-toolchain
Date: 03/23/2005 19:42:32
In article <20050324003410.GA32555@che.ojctech.com>,
David Young  <dyoung@pobox.com> wrote:
>-=-=-=-=-=-
>
>Y'all,
>
>I am building NetBSD CompactFlash images for "rooftop" wireless routers
>based on the Soekris SBC.  It's important that I can put both a DOS MBR
>and a proper NetBSD disklabel on the system.  I badly need to support
>developers who want to build CF images on 1.6.2 and Linux.  Hence the
>attached patches, that make fdisk and disklabel into "host tools."
>
>I would like to get your feedback on this before I commit to -current.
>I hope that this can make it into the 3.1 release.
>
>In broad overview, here are the changes I've made to the tools and
>build system:
>
>        In disklabel and fdisk, I've conditioned uses of ioctl(2) and
>        sysctl(3) on !defined(HAVE_NBTOOL_CONFIG_H).
>
>        If defined(HAVE_NBTOOL_CONFIG_H), I #include many system
>        header files using relative paths.
>
>        sys/disklabel.h #includes <machine/disklabel.h>.  Working around
>        this was kind of tricky.  My solution is to install all the
>        machine/*.h header files in $TOOLDIR/nbmachine/nbmachine/.
>        I made some changes to bsd.kinc.mk for this purpose, and I added
>        src/tools/nbmachine/Makefile.

ok.

>P.S. There are some extraneous changes I intend to commit separately.
>
>        Changed all subroutine and variable names from KNF to Pascal/Java
>        style (disklabel -> DiskLabel).
>
>        (Switched to GNU)
>            {
>                indentation style;
>            }
>        thoughout.

Why?

christos