#include <pthread.h>
#include "qapi/error.h"
-#include "qemu-common.h"
#include "qemu/cutils.h"
#include "sysemu/block-backend.h"
#include "block/block_int.h"
#include "block/nbd.h"
#include "qemu/main-loop.h"
+#include "qemu/option.h"
#include "qemu/error-report.h"
#include "qemu/config-file.h"
#include "qemu/bswap.h"
static void version(const char *name)
{
printf(
-"%s " QEMU_VERSION QEMU_PKGVERSION "\n"
+"%s " QEMU_FULL_VERSION "\n"
"Written by Anthony Liguori.\n"
"\n"
QEMU_COPYRIGHT "\n"
return NULL;
}
+static void qemu_nbd_shutdown(void)
+{
+ job_cancel_sync_all();
+ bdrv_close_all();
+}
+
int main(int argc, char **argv)
{
BlockBackend *blk;
exit(EXIT_FAILURE);
}
bdrv_init();
- atexit(bdrv_close_all);
+ atexit(qemu_nbd_shutdown);
srcpath = argv[optind];
if (imageOpts) {