[Nut-upsdev] USB support for Sweex 1000 VA UPS (was: Help with

Charles Lepple clepple at gmail.com
Wed May 23 03:28:39 UTC 2007


On 5/22/07, Peter van Valderen <p.v.valderen at probu.nl> wrote:
> Basically I made my own standalone driver that
> uses nut_usb.c, I had to make two small patches to that to get it to
> work. I worked on the 2.1.0 SVN.

Please mention the SVN revision in future posts. The "2.1.0" version
number is only a placeholder until the next release, but the SVN
revision (currently 910, as I write this) changes every time something
gets committed.

> The changes for nut_usb entail putting the productid/vendorid in, and
> detaching the kernel driver that somehow claims the USB device.
>
> I hope it's okay posting them here, sorry if it isn't!

This is the right place.

> Hopefully there are some things I can do to finalise the driver and
> maybe include it in the SVN?

I will defer to Peter Selinger on the driver itself, but here are a
few suggestions for the diffs:

* The usual convention is "diff -u oldfile newfile". The "-u" (or
"-c", but that's a little harder to read) prints some lines of context
before and after the code, and it also prints the dates of the files
so that you can be sure which part is newer.

* With SVN, your working copy has the original checked-out code
stashed away in the .svn directory, and all you need to do is run "svn
diff" to see your local changes. This produces output very similar to
"diff -u".

* It's not a problem yet, but if the patches and new files start
getting over 20-30 KB, please compress them before sending them to the
list.

-- 
- Charles Lepple



More information about the Nut-upsdev mailing list