From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z70uY-0007r0-1F for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z70uT-0003km-Uu for qemu-devel@nongnu.org; Mon, 22 Jun 2015 08:33:13 -0400 Date: Mon, 22 Jun 2015 13:33:06 +0100 From: Stefan Hajnoczi Message-ID: <20150622123306.GA783@stefanha-thinkpad.redhat.com> References: <1432115859-11413-1-git-send-email-dimara@arrikto.com> <1432115859-11413-6-git-send-email-dimara@arrikto.com> <20150619123302.GK11189@stefanha-thinkpad.redhat.com> <20150622101843.GA16825@arr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <20150622101843.GA16825@arr> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v4 5/5] raw-posix: Introduce hdev_is_sg() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dimitris Aragiorgis Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 22, 2015 at 01:18:43PM +0300, Dimitris Aragiorgis wrote: > So I suggest we go with the submitted patch taking into account Eric's > proposal: The code first stat()s the given filename to ensure it is a > character device node, and then it issues the SG_GET_VERSION_NUM and > SG_GET_SCSI_ID ioctl()s. That's fine. Regarding Eric's comment about ioctl number collisions, I've checked Linux Documentation/ioctl/ioctl-number.txt. At least under Linux there is no collision for SG_GET_VERSION_NUM/SG_GET_SCSI_ID. Stefan --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJViACCAAoJEJykq7OBq3PId+8H/iEFYgdP3b5veQPW6SthNzDb aPDvEnexgUS7y9LgpJhx3nz82Ve6Jr3KSKHVreXHGvdCoklGMZCwQwof0PQFrtT+ RgYgnpxHDLPu8/3D56TqekdsbXKEgSUONk9/RyuvuVHdWaZRGTONbvc+aK3VzzD4 KVwxMO4VWQoUZvd/BYSqwncaGLTCMG3zgWXxtJCuW4MSAnInJ0Apbbnl575E7lyl RgMrKOsgmLfmdB/qKZwr8Mw+Dcf0t91epbflmalLRsWaBYYcC9R46rJePb2OzttI UTx/AJtOiEFft8191fDTbQw25KFhX/F/qq6WiU8nF/dNrgmegV3hz+z0ieV88gU= =lfZd -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF--