Skip to content

Commit

Permalink
nbd-server-add: Fix the default for 'writable'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zippy2 authored and bonzini committed Nov 28, 2012
1 parent 8ffaaba commit f3313d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blockdev-nbd.c
Expand Up @@ -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;
Expand Down

0 comments on commit f3313d2

Please sign in to comment.