From 07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3 Mon Sep 17 00:00:00 2001 From: Naphtali Sprei Date: Sun, 14 Mar 2010 15:19:57 +0200 Subject: read-only: minor cleanup Really use read-only flags for opening the file when asked for read-only Signed-off-by: Naphtali Sprei Signed-off-by: Anthony Liguori --- qemu-nbd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'qemu-nbd.c') diff --git a/qemu-nbd.c b/qemu-nbd.c index eac0c21f1c..a393583040 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); -- cgit v1.2.3