[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for fwcontrol

In message <4905EE3A_(_dot_)_1050506_(_at_)_miralink_(_dot_)_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?


	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);
#warning "You need to add support for your OS"

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.

freebsd-firewire_(_at_)_freebsd_(_dot_)_org mailing list
To unsubscribe, send any mail to "freebsd-firewire-unsubscribe_(_at_)_freebsd_(_dot_)_org"