[libvirt] [PATCH 2/2] storage: Introduce --inactive for pool-dumpxml
Michal Privoznik
mprivozn at redhat.com
Mon Jun 25 10:43:16 UTC 2012
On 25.06.2012 12:38, Daniel P. Berrange wrote:
> On Mon, Jun 25, 2012 at 12:32:48PM +0200, Michal Privoznik wrote:
>> Storage is one of the last domains in libvirt where we don't fully
>> utilize inactive and live XML. Okay, it might be because we don't
>> have support for that. So implement such support. However, we need
>> to fallback when talking to old daemon which doesn't support this
>> new flag.
>> ---
>> src/storage/storage_driver.c | 10 ++++++++--
>> tools/virsh.c | 24 ++++++++++++++++++++++--
>> tools/virsh.pod | 4 +++-
>> 3 files changed, 33 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
>> index 3b95c70..0b65369 100644
>> --- a/src/storage/storage_driver.c
>> +++ b/src/storage/storage_driver.c
>> @@ -960,9 +960,10 @@ storagePoolGetXMLDesc(virStoragePoolPtr obj,
>> {
>> virStorageDriverStatePtr driver = obj->conn->storagePrivateData;
>> virStoragePoolObjPtr pool;
>> + virStoragePoolDefPtr def;
>> char *ret = NULL;
>>
>> - virCheckFlags(0, NULL);
>> + virCheckFlags(VIR_DOMAIN_XML_INACTIVE, NULL);
>
> We can't just use the VIR_DOMAIN_XML_INACTIVE flag - we
> must have a VIR_STORAGE_XML_INACTIVE flag here.
>
> Daniel
>
While I would fundamentally agree, unfortunately we've already
documented that flags passed to virStoragePoolGetXMLDesc() are typeof
virDomainXMLFlags;
On the other hand, there currently are no flags yet, so nobody uses this
nowadays. So let me resend with VIR_STORAGE_XML_INACTIVE.
Michal
More information about the libvir-list
mailing list