[Nut-upsdev] Re: [nut-commits] svn commit r801 - in

Peter Selinger selinger at mathstat.dal.ca
Sun Mar 4 22:59:03 CET 2007


Alexander I. Gordeev wrote:
> 
> Peter Selinger wrote:
> > I thought about adding three options
> > -x vendorid
> > -x productid
> > -x subdriver
> > [...]
> 
> I think, the first way is the best. It is:
>   - flexible
>   - the same way is in the other usb drivers
>   - more adequate to the things that go internally (automatic matching
>     with some constraints)
> 
> [...]
> 
> I'd rather use the "port" variable like that:
>   - "auto" for usual automatic matching
>   - "bus/device" for manual selection
> I think the latter would be useful in some cases (debugging; if user has
> 2 identical UPSes). Just an opinion.

I think this use of the "port" variable would be confusing. It is
really only useful for debugging, because the device number can change
on each reboot, or each time the device is plugged in. Moreover,
bus/device numbers are not portable across operating systems as far as
I know (on Linux they look like 003/002, but I don't know if this is
universally true). 

We have discussed the case of multiple identical UPS's in the
past. Many manufacturers provide a serial number so that -x serial can
be used. If this ever becomes an issue, it is better to add new "-x
usbbus" and "-x usbdevice" options to the existing regular expression
matcher, as this would be portable across operating systems. This
would lead to problems with the "reconnect" code though, as this would
be unable to identify the device.

In my opinion, it's probably best to leave this unimplemented for
now. -- Peter




More information about the Nut-upsdev mailing list