From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nrwar-0000SU-KW for qemu-devel@nongnu.org; Wed, 17 Mar 2010 12:59:41 -0400 Received: from [199.232.76.173] (port=35644 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nrwaq-0000RU-W2 for qemu-devel@nongnu.org; Wed, 17 Mar 2010 12:59:41 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nrwap-0004nb-ML for qemu-devel@nongnu.org; Wed, 17 Mar 2010 12:59:40 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:33205) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nrwap-0004nX-BS for qemu-devel@nongnu.org; Wed, 17 Mar 2010 12:59:39 -0400 Received: by pvf33 with SMTP id 33so616245pvf.4 for ; Wed, 17 Mar 2010 09:59:38 -0700 (PDT) Message-ID: <4BA10A77.2070106@codemonkey.ws> Date: Wed, 17 Mar 2010 11:59:35 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 1/2] read-only: minor cleanup References: <1268572797-31664-1-git-send-email-nsprei@redhat.com> In-Reply-To: <1268572797-31664-1-git-send-email-nsprei@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Naphtali Sprei Cc: qemu-devel@nongnu.org On 03/14/2010 08:19 AM, Naphtali Sprei wrote: > Really use read-only flags for opening the file when asked for read-only > > Signed-off-by: Naphtali Sprei > Applied all. Thanks. Regards, Anthony Liguori > --- > qemu-nbd.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/qemu-nbd.c b/qemu-nbd.c > index eac0c21..a393583 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -258,6 +258,7 @@ int main(int argc, char **argv) > break; > case 'r': > readonly = true; > + flags&= ~BDRV_O_RDWR; > break; > case 'P': > partition = strtol(optarg,&end, 0); >