nbd: do not include block_int.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7fe7b68b32
commit
38ceff0412
3
nbd.c
3
nbd.c
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "nbd.h"
|
#include "nbd.h"
|
||||||
#include "block.h"
|
#include "block.h"
|
||||||
#include "block_int.h"
|
|
||||||
|
|
||||||
#include "qemu-coroutine.h"
|
#include "qemu-coroutine.h"
|
||||||
|
|
||||||
|
@ -703,7 +702,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset,
|
||||||
exp->bs = bs;
|
exp->bs = bs;
|
||||||
exp->dev_offset = dev_offset;
|
exp->dev_offset = dev_offset;
|
||||||
exp->nbdflags = nbdflags;
|
exp->nbdflags = nbdflags;
|
||||||
exp->size = size == -1 ? exp->bs->total_sectors * 512 : size;
|
exp->size = size == -1 ? bdrv_getlength(bs) : size;
|
||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "block_int.h"
|
#include "block.h"
|
||||||
#include "nbd.h"
|
#include "nbd.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -487,7 +487,7 @@ int main(int argc, char **argv)
|
||||||
err(EXIT_FAILURE, "Failed to bdrv_open '%s'", argv[optind]);
|
err(EXIT_FAILURE, "Failed to bdrv_open '%s'", argv[optind]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fd_size = bs->total_sectors * 512;
|
fd_size = bdrv_getlength(bs);
|
||||||
|
|
||||||
if (partition != -1) {
|
if (partition != -1) {
|
||||||
ret = find_partition(bs, partition, &dev_offset, &fd_size);
|
ret = find_partition(bs, partition, &dev_offset, &fd_size);
|
||||||
|
|
Loading…
Reference in a new issue