Revision 38ceff04 nbd.c

b/nbd.c
18 18

  
19 19
#include "nbd.h"
20 20
#include "block.h"
21
#include "block_int.h"
22 21

  
23 22
#include "qemu-coroutine.h"
24 23

  
......
703 702
    exp->bs = bs;
704 703
    exp->dev_offset = dev_offset;
705 704
    exp->nbdflags = nbdflags;
706
    exp->size = size == -1 ? exp->bs->total_sectors * 512 : size;
705
    exp->size = size == -1 ? bdrv_getlength(bs) : size;
707 706
    return exp;
708 707
}
709 708

  

Also available in: Unified diff