* [Qemu-devel] [PATCH] nbd-server-add: Fix the default for 'writable'
@ 2012-11-28 10:46 Michal Privoznik
2012-11-28 10:48 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Michal Privoznik @ 2012-11-28 10:46 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial
The documentation to this monitor command tells, that 'writable'
argument is optional and defaults to false. However, the code sets
true as the default. But since some applications may already been
using this, it's safer to fix the code and not documentation which
would break those applications.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
blockdev-nbd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index d1721a3..6b26bbf 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -99,7 +99,7 @@ void qmp_nbd_server_add(const char *device, bool has_writable, bool writable,
}
if (!has_writable) {
- writable = true;
+ writable = false;
}
if (bdrv_is_read_only(bs)) {
writable = false;
--
1.7.8.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-28 10:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 10:46 [Qemu-devel] [PATCH] nbd-server-add: Fix the default for 'writable' Michal Privoznik
2012-11-28 10:48 ` Paolo Bonzini
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).