On Wed, May 25, 2016 at 09:47:59 +0200, Michal Privoznik wrote:
On 24.05.2016 15:17, Peter Krempa wrote:
> Extract information for all disks and update tray state and source only
> for removable drives. Additionally store whether a drive is removable
> and whether it has a tray.
> ---
> src/qemu/qemu_domain.h | 4 ++++
> src/qemu/qemu_monitor.c | 18 ------------------
> src/qemu/qemu_monitor.h | 3 ---
> src/qemu/qemu_process.c | 28 +++++++++++++++-------------
> 4 files changed, 19 insertions(+), 34 deletions(-)
>
> diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
> index 825036c..9ac0209 100644
> --- a/src/qemu/qemu_domain.h
> +++ b/src/qemu/qemu_domain.h
> @@ -299,6 +299,10 @@ struct _qemuDomainDiskPrivate {
> /* for storage devices using auth/secret
> * NB: *not* to be written to qemu domain object XML */
> qemuDomainSecretInfoPtr secinfo;
> +
> + /* information about the device */
> + bool tray; /* device has tray */
> + bool removable; /* device media can be removed/changed */
I wonder whether we should drop these one day and replace them with
struct qemuDomainDiskInfo which lives right below this struct (not to
My plan is to actually remove qemuDomainDisk info in the future. The
reason why I didn't do so is that some of the data in qemuDomainDiskInfo
are just temporary or are represented differently in the disk
definition.
These two are true for the lifetime of the disk and won't change so
therefore I've copied it and discarded the rest.
Also one of my plans is to unify all 3 monitor APIs that call
'query-block' into one data structure which will contain all the data.
Peter