From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJfdL-0003I8-PN for qemu-devel@nongnu.org; Mon, 27 Jul 2015 06:27:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJfdI-0008V4-AJ for qemu-devel@nongnu.org; Mon, 27 Jul 2015 06:27:47 -0400 Date: Mon, 27 Jul 2015 11:27:40 +0100 From: Stefan Hajnoczi Message-ID: <20150727102740.GF30018@stefanha-thinkpad.redhat.com> References: <4E49353C-F0D9-43CA-B4FE-BB5E85FCEEDC@gmail.com> <20150724150020.GA26843@stefanha-thinkpad.redhat.com> <82E05471-B0FA-4819-9CEA-43153BBEDA1C@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l+goss899txtYvYf" Content-Disposition: inline In-Reply-To: <82E05471-B0FA-4819-9CEA-43153BBEDA1C@gmail.com> Subject: Re: [Qemu-devel] [PATCH v3] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Kevin Wolf , qemu-devel qemu-devel , Qemu-block --l+goss899txtYvYf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 24, 2015 at 11:37:50AM -0400, Programmingkid wrote: >=20 > On Jul 24, 2015, at 11:00 AM, Stefan Hajnoczi wrote: >=20 > > On Fri, Jul 17, 2015 at 08:19:16PM -0400, Programmingkid wrote: > >> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIte= rator, char *bsdPath, CFIndex ma > >> if ( bsdPathAsCFString ) { > >> size_t devPathLength; > >> strcpy( bsdPath, _PATH_DEV ); > >> - strcat( bsdPath, "r" ); > >> + if (flags & BDRV_O_NOCACHE) { > >> + strcat(bsdPath, "r"); > >> + } > >> devPathLength =3D strlen( bsdPath ); > >> if ( CFStringGetCString( bsdPathAsCFString, bsdPath + devP= athLength, maxPathSize - devPathLength, kCFStringEncodingASCII ) ) { > >> kernResult =3D KERN_SUCCESS; > >=20 > > This hunk should be a separate patch. =20 >=20 > If I made the changes to the GetBSDPath() function its own patch, QEMU wo= uld no longer compile. The addition of a flags argument would cause this is= sue. Please include the addition of the flags argument and the change to the call site in the separate patch. This is a single logical change which deserves its own commit. That way you can explain that /dev/cdrom was opening the raw char device but not probing alignment, causing bdrv_read() to fail. --l+goss899txtYvYf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVtgecAAoJEJykq7OBq3PI5ZQIAMK+xMJDH6WBHa8IoZWFfL/H 2Sl66UUe+iST5uN/cii26OppN/PZbPHWEnZwAC5m3yGh/3DmIM4oBRTgPy7bWohi fh0nhtLsePppryb01Ej/3YpoV8d/tXV0Ac84CWYs4nkN3WLGJnzXgirNVU4xBVd8 0PAp8e6E8eNvV+XqooaDnnKLvXKMyt2s0bwCmbJFI9XsvLUghK3qVAfawQ+6WMSb 7k6Upkomovtg8AfEzeUWNHMZhb8zEMG1JkNo1i+qmL1XAjiFLiwVNHOdV4gRB0FE 9LtlL189t6Ld0q8N8A9pTOIF5X/CuULJJJk8ikPnoEPDF2G0CSIyA4ikbfnht1k= =dgx4 -----END PGP SIGNATURE----- --l+goss899txtYvYf--