qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3] raw-posix.c: Make physical devices usable in


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v3] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host
Date: Mon, 27 Jul 2015 11:27:40 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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.

Attachment: pgpjY8BGSQLDq.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]