This is where I'm going with fwcontrol

Sean Bruno sbruno at miralink.com
Wed Jul 2 00:26:29 UTC 2008


Sean Bruno wrote:
> Take a look at what I'm doing with fwcontrol if you have time.
>
> I'm modifying it such that it can find nodes on different "buses" or 
> cards and allowing it to parse all arguments before execution begins.  
> It's in the primitive stages right now and I'd really like to know 
> what you think.
>
> Here is a current diff against RELENG_7 which seems to be the same as 
> -CURRENT.
>
> Sean
> ------------------------------------------------------------------------
>
> _______________________________________________
> freebsd-firewire at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-firewire
> To unsubscribe, send any mail to "freebsd-firewire-unsubscribe at freebsd.org"
Here is today's version of fwcontrol.  

SUMMARY:
-- cleanup a couple of memory leaks missing free's
-- add "-p" to the usage display
-- rework main() while loop to not act on arguments.  Store those 
arguments so that multiple arguments can be passed on the command line. 
              example:  sudo fwcontrol -u 1 -r -o
--  Allow code to use "-u" to denote a different /dev/fwX device other 
thatn /dev/fw0.  This allows commands like a bus reset to act on a 
second firewire bus/card.
--  Maintain backwards compatibility when "-u" is not used to mean that 
the command is to use /dev/fw0
-- Minor break to compatiblity.  If fwcontrol is run with no arguments 
and there is more that one /dev/fwX device, it will iterate across all 
devices.  Old behavior was to simply display the first device.

I'd like some review of the code from anyone who has the time.  I think 
that this is worth while to merge into -CURRENT and possibly back into 
7.0 and 6.3 as I spent some considerable time on emulating the old behavior.

I cannot test the -S/R/M arguments as I do not have a firewire video 
camera and would love to know if I've broken anything!  :)



-- 
Sean Bruno
MiraLink Corporation
6015 NE 80th Ave, Ste 100
Portland, OR 97218
Phone 503-621-5143
Fax 503-621-5199

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fwcontrol.c.diff
Type: text/x-patch
Size: 11820 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-firewire/attachments/20080702/2889890c/fwcontrol.c.bin


More information about the freebsd-firewire mailing list