Subject: Re: CVS commit: src/sys/sys
To: Izumi Tsutsui <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 11/14/2003 07:08:24
On Nov 14, 2003, at 4:19 AM, Izumi Tsutsui wrote:
> In article <20031114113254.O4919@snowdrop.l8s.co.uk>
> firstname.lastname@example.org wrote:
>> sys/disklabel could be in src/tools/compat/sys - but you still need to
>> stop in going after machine/* since you don't know 'machine'.
> You could create symlinks which points to files in proper machine dirs.
No, you can't. Some people use the tools built in a
machine-independent way... i.e. they build the tools for a
> I think what you want to do exactly is
> "including declarations of struct disklabel and struct pattitions
> without including <machine/disklabel.h>", right?
> Then using MAXPARTITIONS or _MACHINE_DISKLABEL_H_ is
> not correct even if it works for now.
> It's still better to add declarations into sys/bootblock.h
> to define info about target machines.
Agreed. Or add it to sys/disklabel.h prefaced with the machine name:
#define MAXPARTITIONS_HP300 8
and then in <machine/disklabel.h> for hp300:
#define MAXPARTITIONS MAXPARTITIONS_HP300
This would even allow us to move forward on a disklabel library that
understood the disklabel formats/offsets used by our various platforms.
-- Jason R. Thorpe <email@example.com>