aboutsummaryrefslogtreecommitdiff
path: root/qemu-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 /qemu-nbd.c
parent7fe7b68b32ba609faeeee03556aac0eb1b187c91 (diff)
nbd: do not include block_int.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 6c3f9b5de5..5a0300eb07 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -17,7 +17,7 @@
*/
#include "qemu-common.h"
-#include "block_int.h"
+#include "block.h"
#include "nbd.h"
#include <stdarg.h>
@@ -487,7 +487,7 @@ int main(int argc, char **argv)
err(EXIT_FAILURE, "Failed to bdrv_open '%s'", argv[optind]);
}
- fd_size = bs->total_sectors * 512;
+ fd_size = bdrv_getlength(bs);
if (partition != -1) {
ret = find_partition(bs, partition, &dev_offset, &fd_size);