Revision faf07963 block.c
b/block.c | ||
---|---|---|
21 | 21 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
22 | 22 |
* THE SOFTWARE. |
23 | 23 |
*/ |
24 |
#ifdef QEMU_IMG |
|
25 |
#include "qemu-common.h" |
|
26 |
#else |
|
24 | 27 |
#include "vl.h" |
28 |
#endif |
|
25 | 29 |
#include "block_int.h" |
26 | 30 |
|
27 | 31 |
#ifdef _BSD |
... | ... | |
53 | 57 |
static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num, |
54 | 58 |
const uint8_t *buf, int nb_sectors); |
55 | 59 |
|
56 |
static BlockDriverState *bdrv_first;
|
|
60 |
BlockDriverState *bdrv_first; |
|
57 | 61 |
static BlockDriver *first_drv; |
58 | 62 |
|
59 | 63 |
int path_is_absolute(const char *path) |
... | ... | |
859 | 863 |
bdrv_flush(bs->backing_hd); |
860 | 864 |
} |
861 | 865 |
|
866 |
#ifndef QEMU_IMG |
|
862 | 867 |
void bdrv_info(void) |
863 | 868 |
{ |
864 | 869 |
BlockDriverState *bs; |
... | ... | |
898 | 903 |
term_printf("\n"); |
899 | 904 |
} |
900 | 905 |
} |
906 |
#endif |
|
901 | 907 |
|
902 | 908 |
void bdrv_get_backing_filename(BlockDriverState *bs, |
903 | 909 |
char *filename, int filename_size) |
... | ... | |
1102 | 1108 |
/**************************************************************/ |
1103 | 1109 |
/* async block device emulation */ |
1104 | 1110 |
|
1105 |
#ifdef QEMU_TOOL
|
|
1111 |
#ifdef QEMU_IMG
|
|
1106 | 1112 |
static BlockDriverAIOCB *bdrv_aio_read_em(BlockDriverState *bs, |
1107 | 1113 |
int64_t sector_num, uint8_t *buf, int nb_sectors, |
1108 | 1114 |
BlockDriverCompletionFunc *cb, void *opaque) |
... | ... | |
1172 | 1178 |
qemu_bh_cancel(acb->bh); |
1173 | 1179 |
qemu_aio_release(acb); |
1174 | 1180 |
} |
1175 |
#endif /* !QEMU_TOOL */
|
|
1181 |
#endif /* !QEMU_IMG */
|
|
1176 | 1182 |
|
1177 | 1183 |
/**************************************************************/ |
1178 | 1184 |
/* sync block device emulation */ |
Also available in: Unified diff