[Nut-upsdev] nut + usb + udev with kernel 2.6.22

Gilad Arnold arnold at cs.berkeley.edu
Mon Oct 8 17:43:37 UTC 2007


I agree with both arguments. Perhaps an unguarded GOTO is the cleanest
solution?

SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real"
SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real"
GOTO="nut-usbups_rules_end"

Gilad


On Mon, Oct 08, 2007 at 07:22:35PM +0200, Arjen de Korte wrote:
> 
> >> As long as SUBSYSTEM is equal to "usb" or "usb_device", that doesn't
> >> matter. If not, if BUS either doesn't exist or is not equal to "usb", we
> >> should probably skip the remainder.
> >
> > I mean why don't you just write:
> >
> > SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real"
> > SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"
> >
> > instead of:
> >
> > SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real"
> > SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real"
> > BUS!="usb", GOTO="nut-usbups_rules_end"
> 
> Well, one reason that comes to mind is that mixing positive ('equal to')
> and negative ('not equal to') logic is prone to (human) errors. If the
> following comparison to the BUS variable is useful, is something that I
> don't know, but I surely wouldn't like to follow your example here.
> 
> Best regards, Arjen
> 
> 
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev



More information about the Nut-upsdev mailing list