From: Stefan Hajnoczi <stefanha@gmail.com>
To: Programmingkid <programmingkidx@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>,
Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [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 [thread overview]
Message-ID: <20150727102740.GF30018@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <82E05471-B0FA-4819-9CEA-43153BBEDA1C@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
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 #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-07-27 10:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 0:19 [Qemu-devel] [PATCH v3] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host Programmingkid
2015-07-24 15:00 ` Stefan Hajnoczi
2015-07-24 15:37 ` Programmingkid
2015-07-27 10:27 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150727102740.GF30018@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=kwolf@redhat.com \
--cc=programmingkidx@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).