=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/usbhidctl/usbhid.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/usbhidctl/usbhid.c 2008/10/16 18:37:19 1.9 --- src/usr.bin/usbhidctl/usbhid.c 2010/08/02 13:57:32 1.10 *************** *** 1,4 **** ! /* $OpenBSD: usbhid.c,v 1.9 2008/10/16 18:37:19 jakemsr Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: usbhid.c,v 1.10 2010/08/02 13:57:32 miod Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* *************** *** 937,943 **** dev = devnamebuf; } ! hidfd = open(dev, O_RDWR); if (hidfd < 0) err(1, "%s", dev); --- 937,943 ---- dev = devnamebuf; } ! hidfd = open(dev, wflag ? O_RDWR : O_RDONLY); if (hidfd < 0) err(1, "%s", dev);