uhub: retry attaching device

2013-01-20 Thread Alexander Polakov
So I have got this device: addr 2: File-backed Storage Gadget, Linux 2.6.24.2-Boeye with s3c-udc The problem is that when I connect it to PC, it asks for confirmation and I have to press button on the device. I guess uhub exploration code timeouts while I'm doing that and gives me "uhub0: device

fcntl F_SETFD 1->FD_CLOEXEC

2013-01-20 Thread David Hill
Use FD_CLOEXEC instead of 1. Change one instance in libutil to use O_CLOEXEC instead of a fcntl right after. Index: bin/systrace/openbsd-syscalls.c === RCS file: /cvs/src/bin/systrace/openbsd-syscalls.c,v retrieving revision 1.41 dif

Re: usr.bin/chpass diff

2013-01-20 Thread David Hill
Review? On Fri, Jan 18, 2013 at 12:28:59AM -0500, David Hill wrote: :- use FD_CLOEXEC instead of 1 :- use O_CLOEXEC with open() instead of open/fcntl : :Index: usr.bin/chpass/chpass.c :=== :RCS file: /cvs/src/usr.bin/chpass/chpass.c,v

faithd fcntl diff

2013-01-20 Thread David Hill
O_NONBLOCK is set with F_SETFL Index: usr.sbin/faithd/tcp.c === RCS file: /cvs/src/usr.sbin/faithd/tcp.c,v retrieving revision 1.12 diff -N -u -p usr.sbin/faithd/tcp.c --- usr.sbin/faithd/tcp.c 8 Sep 2002 01:20:15 - 1.