|
From: | Avi Kivity |
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 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |