aboutsummaryrefslogtreecommitdiff
path: root/blockdev-nbd.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2012-11-28 11:46:39 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-28 11:56:39 +0100
commitf3313d23a061648c99609a4c127ed13c820f831d (patch)
tree47695b402bcdd4dfd6edccdceac9597a2d54521a /blockdev-nbd.c
parent8ffaaba0e939f2a284bb23d1f6f7f9e2104a97e2 (diff)
downloadqemu-arm-f3313d23a061648c99609a4c127ed13c820f831d.tar.gz
nbd-server-add: Fix the default for 'writable'
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> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'blockdev-nbd.c')
-rw-r--r--blockdev-nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index d1721a3e26..6b26bbf8c5 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;