]> git.proxmox.com Git - qemu.git/blobdiff - block.h
qapi: modify visitor code generation for list iteration
[qemu.git] / block.h
diff --git a/block.h b/block.h
index 6e0c4683b9a9d2f2480add9804be3cf2df237202..16bfa0a3d6e814946853d1a4b530258c34e00dac 100644 (file)
--- a/block.h
+++ b/block.h
@@ -32,11 +32,12 @@ typedef struct QEMUSnapshotInfo {
 typedef struct BlockDevOps {
     /*
      * Runs when virtual media changed (monitor commands eject, change)
+     * Argument load is true on load and false on eject.
      * Beware: doesn't run when a host device's physical media
      * changes.  Sure would be useful if it did.
      * Device models with removable media must implement this callback.
      */
-    void (*change_media_cb)(void *opaque);
+    void (*change_media_cb)(void *opaque, bool load);
     /*
      * Is the virtual tray open?
      * Device models implement this only when the device has a tray.
@@ -269,6 +270,7 @@ int bdrv_img_create(const char *filename, const char *fmt,
                     const char *base_filename, const char *base_fmt,
                     char *options, uint64_t img_size, int flags);
 
+void bdrv_set_buffer_alignment(BlockDriverState *bs, int align);
 void *qemu_blockalign(BlockDriverState *bs, size_t size);
 
 #define BDRV_SECTORS_PER_DIRTY_CHUNK 2048