aboutsummaryrefslogtreecommitdiff
path: root/nbd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-03-12 16:17:27 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-04-19 17:19:37 +0200
commit38ceff0412621a35fa618fb46cd7f0f6ff037c13 (patch)
treead44292ce41b880b5130d8fd744826b9c534bfb0 /nbd.c
parent7fe7b68b32ba609faeeee03556aac0eb1b187c91 (diff)
downloadqemu-arm-38ceff0412621a35fa618fb46cd7f0f6ff037c13.tar.gz
nbd: do not include block_int.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'nbd.c')
-rw-r--r--nbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nbd.c b/nbd.c
index 4c6d7f193d..d4dafc6019 100644
--- a/nbd.c
+++ b/nbd.c
@@ -18,7 +18,6 @@
#include "nbd.h"
#include "block.h"
-#include "block_int.h"
#include "qemu-coroutine.h"
@@ -703,7 +702,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset,
exp->bs = bs;
exp->dev_offset = dev_offset;
exp->nbdflags = nbdflags;
- exp->size = size == -1 ? exp->bs->total_sectors * 512 : size;
+ exp->size = size == -1 ? bdrv_getlength(bs) : size;
return exp;
}