From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 11 06:06:31 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9290210656CA for ; Tue, 11 Aug 2009 06:06:31 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 48CC18FC16 for ; Tue, 11 Aug 2009 06:06:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 01893C10C; Tue, 11 Aug 2009 09:06:28 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 60782-04; Tue, 11 Aug 2009 09:06:28 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 1A1B6BB47; Tue, 11 Aug 2009 09:06:28 +0300 (EEST) Message-ID: <4A810A62.1070408@bulinfo.net> Date: Tue, 11 Aug 2009 09:06:26 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A8006F3.5020800@bulinfo.net> <200908101527.32952.hselasky@c2i.net> In-Reply-To: <200908101527.32952.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-hackers@freebsd.org Subject: Re: Help with device drivers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2009 06:06:32 -0000 Hans Petter Selasky wrote: > On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: >> If I try to open the device from userland with: >> fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the >> device for reading first and then for writing. > > There is a bug in the code. If you open using read+write flags, then the FIFO > open routine is called two times. The RD+WR check should be moved to the ioctl > routine. > > http://perforce.freebsd.org/chv.cgi?CH=167171 Thanks! It seems that sys/dev/usb/storage/urio.c should be fixed too? Best Regards > > --HPS > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >