Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2008 09:17:58 +0000
From:      Dieter <freebsd@sopwith.solgatos.com>
To:        Sean Bruno <sbruno@miralink.com>
Cc:        freebsd-firewire@freebsd.org
Subject:   Re: patch for fwcontrol 
Message-ID:  <200811101717.RAA12234@sopwith.solgatos.com>
In-Reply-To: Your message of "Mon, 27 Oct 2008 09:37:14 PDT." <4905EE3A.1050506@miralink.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <4905EE3A.1050506@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811101717.RAA12234>