|
From: | Paolo Bonzini |
Subject: | Re: [RFC PATCH v2 13/25] include/systemu/blockdev.h: global state API |
Date: | Thu, 7 Oct 2021 14:00:21 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
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 <pbonzini@redhat.com>
[Prev in Thread] | Current Thread | [Next in Thread] |