On Fri, Jul 24, 2015 at 11:37:50AM -0400, Programmingkid wrote: > > On Jul 24, 2015, at 11:00 AM, Stefan Hajnoczi wrote: > > > On Fri, Jul 17, 2015 at 08:19:16PM -0400, Programmingkid wrote: > >> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t > >> mediaIterator, 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 = strlen( bsdPath ); > >> if ( CFStringGetCString( bsdPathAsCFString, bsdPath + > >> devPathLength, maxPathSize - devPathLength, kCFStringEncodingASCII ) ) { > >> kernResult = KERN_SUCCESS; > > > > This hunk should be a separate patch. > > If I made the changes to the GetBSDPath() function its own patch, QEMU would > no longer compile. The addition of a flags argument would cause this issue.
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.
pgp0YfK0eZU0m.pgp
Description: PGP signature