diff options
author | Hani Benhabiles <kroosec@gmail.com> | 2014-05-18 11:50:04 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-27 16:06:48 +0200 |
commit | 60fe4fac22895576973e317d7148b084c31cc64c (patch) | |
tree | a9582869f944a34d9e0794fd7d5d0f0b10a9ab32 /nbd.c | |
parent | d4cba13bdf251baeedb36b87c1e9f6766773e380 (diff) |
nbd: Don't export a block device with no medium.
The device is exported with erroneous values and can't be read.
Before the patch:
$ sudo nbd-client localhost -p 10809 /dev/nbd0 -name floppy0
Negotiation: ..size = 17592186044415MB
bs=1024, sz=18446744073709547520 bytes
$ sudo mount /dev/nbd0 /mnt/tmp/
mount: block device /dev/nbd0 is write-protected, mounting read-only
mount: /dev/nbd0: can't read superblock
After the patch:
(qemu) nbd_server_add ide0-hd0
(qemu) nbd_server_add floppy0
Device 'floppy0' has no medium
Signed-off-by: Hani Benhabiles <kroosec@gmail.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'nbd.c')
0 files changed, 0 insertions, 0 deletions