On Thu, Oct 20, 2011 at 16:32:55 +0100, Daniel P. Berrange wrote:
On Thu, Oct 20, 2011 at 04:52:52PM +0200, Michal Privoznik wrote:
...
> +/**
> + * virConnectDomainEventDiskEjectCallback:
> + * @conn: connection object
> + * @dom: domain on which the event occurred
> + * @target: target which changed status
> + * @reason: reason why this callback was called; any of
> + * virConnectDomainEventDiskEjectReason
> + * @opaque: application specified data
> + *
> + * The callback signature to use when registering for an event of type
> + * VIR_DOMAIN_EVENT_ID_IO_ERROR with virConnectDomainEventRegisterAny()
> + */
> +typedef void (*virConnectDomainEventDiskEjectCallback)(virConnectPtr conn,
> + virDomainPtr dom,
> + const char *srcPath,
> + const char *devAlias,
> + int reason,
> + void *opaque);
It suddenly occurs to me that this event will also be relevant if we
insert new media. So instead of 'srcPath', we should have 'oldSrcPath'
and 'newSrcPath', either one of which may be NULL depending on the
scenarios involved.
In that case I think we should call the event DiskChange instead of DiskEject.
Jirka