On 05/10/21 16:32, Emanuele Giuseppe Esposito wrote:
  DriveInfo *drive_get_next(BlockInterfaceType type);
+DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type,
+                     Error **errp);
+
+/* Common functions that are neither I/O nor Global State */
+
+DriveInfo *blk_legacy_dinfo(BlockBackend *blk);
+int drive_get_max_devs(BlockInterfaceType type);
+
  QemuOpts *drive_def(const char *optstr);
+
  QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
                      const char *optstr);
-DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type,
-                     Error **errp);

drive_add and drive_def touch global state (QemuOpts). But really neither should be in this header: drive_add can be moved to softmmu/vl.c, while drive_def can be inlined into its two callers. With that changed,

Reviewed-by: Paolo Bonzini <[email protected]>


Reply via email to