From: Avi Kivity <avi@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] [PATCH 2/2] raw-posix: Remove O_RDWR when attempting to open a file read-only
Date: Tue, 16 Jun 2009 16:16:49 +0300 [thread overview]
Message-ID: <4A379B41.7040701@redhat.com> (raw)
In-Reply-To: <4A379A37.3020903@redhat.com>
On 06/16/2009 04:12 PM, Kevin Wolf wrote:
>> + s->open_flags&= ~O_RDWR;
>> s->open_flags |= O_RDONLY;
>> bs->read_only = 1;
>> }
>>
>
> Does the standard say anything about the values of the constants?
> Wouldn't it be cleaner to have a s->open_flags&= ~O_ACCMODE before the
> if instead, so that O_RDONLY is reset in the other case?
>
Didn't know about O_ACCMODE. Will fix and repost.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-06-16 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 12:22 [Qemu-devel] [PATCH 0/2] raw-posix block driver fixes Avi Kivity
2009-06-16 12:22 ` [Qemu-devel] [PATCH 1/2] raw-posix: open flags use BDRV_ namespace, not posix namespace Avi Kivity
2009-06-16 12:22 ` [Qemu-devel] [PATCH 2/2] raw-posix: Remove O_RDWR when attempting to open a file read-only Avi Kivity
2009-06-16 13:12 ` Kevin Wolf
2009-06-16 13:16 ` Avi Kivity [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-06-16 13:21 [Qemu-devel] [PATCH 0/2] Subject: [PATCH 0/2] raw-posix block driver fixes (v2) Avi Kivity
2009-06-16 13:21 ` [Qemu-devel] [PATCH 2/2] raw-posix: Remove O_RDWR when attempting to open a file read-only Avi Kivity
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=4A379B41.7040701@redhat.com \
--to=avi@redhat.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--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).