On Mon, Jan 31, 2011 at 03:24:25PM +1100, matthew green wrote: > > > >>>> disklabel.h should export nothing to userland and values userland > > >>>> needs should be obtained via sysctl. > > >>>> > > >>>> I've been asking this question of various developers for a while. > > >>> > > >>> how do i create a disklabel on a file system image as a normal > > >>> user a non-netbsd host with this method? > > >> > > >> But that would be a hosted tool and that's a different case than > > >> a native tool. > > > > > > Where would the hosted tool get that information from? If it's from a > > > MD header file we're back to where we started... > > > > Why? hosted != native. I don't expect a tool to be built on linux to > > know where to get a disklabel from. > > > > I do expect the native on NetBSD to know how to get the disklabel location > > for the current machine it's running on from sysctl and not a header file. > > how does the cross build on linux create an image with a disklabel?
You use environment variables to supply the parameters that native disklabel gets from sysctl: env DISKLABELOFFSET=0 DISKLABELSECTOR=1 $TOOL_DISKLABEL -vvvvv - F -f $DISKTAB -w $IMAGE $DISKTYPE || exit 1 Doesn't look like that's documented, oops. Dave -- David Young OJC Technologies dyo...@ojctech.com Urbana, IL * (217) 344-0444 x24