On 01/28/2016 03:54 AM, Igor Mammedov wrote: > Add commands to query Virtual Machine Generation ID counter. > > QMP command example: > { "execute": "query-vm-generation-id" } > > HMP command example: > info vm-generation-id > > Signed-off-by: Igor Mammedov <imamm...@redhat.com> > --- > v18: > - add a new QMP type GuidInfo instead of reusing UuidInfo > Eric Blake <ebl...@redhat.com> > ---
> +++ b/hmp.c > @@ -2375,3 +2375,12 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const > QDict *qdict) > > qapi_free_RockerOfDpaGroupList(list); > } > + > +void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict) > +{ > + GuidInfo *info = qmp_query_vm_generation_id(NULL); Should we report rather than ignore errors in the HMP interface? > + if (info) { > + monitor_printf(mon, "%s\n", info->guid); > + } > +++ b/qapi-schema.json > @@ -4083,3 +4083,23 @@ > ## > { 'enum': 'ReplayMode', > 'data': [ 'none', 'record', 'play' ] } > + > +## > +# @GuidInfo: > +# > +# GUID information. > +# > +# @guid: the globally unique identifier Maybe add "in usual ASCII format" to make it obvious it is the 36-byte string, not the 16-byte binary value. But neither comment is a strong objection, so: Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature