patch for fwcontrol

Dieter freebsd at sopwith.solgatos.com
Mon Nov 10 23:41:59 PST 2008


In message <4905EE3A.1050506 at miralink.com>, Sean Bruno writes:

> Dieter wrote:
> > The patch below:
> >
> > 	Fixes several err() vs errx() errors
> > 	Improves some range checks
> > 	Improves some messages
> > 	Supports NetBSD in addition to FreeBSD
> >   
> Ok, slightly reworked patch.  Seems to work fine for me.  Comments?

Sean,

	Sorry for the delay, my normal outgoing email is hosed at
the moment due to some problems upstream, so I'm trying workarounds
with varying success.  Incoming email is fine.

	Your version of the patch looks fine, although leaving out
the ".0" of the device name will keep it from working on NetBSD.

	What do you think of something like

#if defined(__FreeBSD__)
	snprintf(devbase, sizeof(devbase), "%s%d", device_string, current_board);
#elif defined(__NetBSD__)
	snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board);
#else
#warning "You need to add support for your OS"
#endif


This make the code a bit messier, and FreeBSD works fine with the extra ".0"
which is why I just added the ".0".  I still don't know what the ".0" was/is for.

So I see three options:

	1) Check your patch in as is.  NetBSDers will have to modify something.

	2) Add the ".0".  Obviously you don't like this option.

	3) Put in the #if stuff as above.

I'd prefer #2 or #3, but if you prefer #1 that's ok.

thanks,
Dieter


More information about the freebsd-firewire mailing list