Revision 38ceff04 qemu-nbd.c
b/qemu-nbd.c | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
#include "qemu-common.h" |
20 |
#include "block_int.h"
|
|
20 |
#include "block.h" |
|
21 | 21 |
#include "nbd.h" |
22 | 22 |
|
23 | 23 |
#include <stdarg.h> |
... | ... | |
487 | 487 |
err(EXIT_FAILURE, "Failed to bdrv_open '%s'", argv[optind]); |
488 | 488 |
} |
489 | 489 |
|
490 |
fd_size = bs->total_sectors * 512;
|
|
490 |
fd_size = bdrv_getlength(bs);
|
|
491 | 491 |
|
492 | 492 |
if (partition != -1) { |
493 | 493 |
ret = find_partition(bs, partition, &dev_offset, &fd_size); |
Also available in: Unified diff