From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Npjcv-0004lJ-0S for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:41 -0500 Received: from [199.232.76.173] (port=55452 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Npjcu-0004ki-E7 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:40 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Npjct-0007I3-BR for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48376) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Npjcs-0007Ht-Uh for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:39 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2BEiabx010225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Mar 2010 09:44:37 -0500 Received: from localhost.localdomain (dhcp-0-60.tlv.redhat.com [10.35.0.60]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2BEiZSO005186 for ; Thu, 11 Mar 2010 09:44:35 -0500 From: Naphtali Sprei Date: Thu, 11 Mar 2010 16:44:33 +0200 Message-Id: <1268318674-10607-1-git-send-email-nsprei@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] read-only: minor cleanup List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Really use read-only flags for opening the file when asked for read-only Signed-off-by: Naphtali Sprei --- qemu-nbd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index eac0c21..d803bfd 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); -- 1.6.3.3