maint: log xml during volume creation

I noticed this while answering a list question about Java bindings
of volume creation.  All other functions that take xml logged xmlDesc.

* src/libvirt.c (virStorageVolCreateXML)
(virStorageVolCreateXMLFrom): Use consistent spelling of xmlDesc,
and log the argument.
This commit is contained in:
Eric Blake 2012-10-30 14:53:56 -06:00
parent 0e7fd31fb5
commit 270a9fef37

View File

@ -13298,7 +13298,7 @@ virStorageVolGetKey(virStorageVolPtr vol)
/** /**
* virStorageVolCreateXML: * virStorageVolCreateXML:
* @pool: pointer to storage pool * @pool: pointer to storage pool
* @xmldesc: description of volume to create * @xmlDesc: description of volume to create
* @flags: extra flags; not used yet, so callers should always pass 0 * @flags: extra flags; not used yet, so callers should always pass 0
* *
* Create a storage volume within a pool based * Create a storage volume within a pool based
@ -13309,10 +13309,10 @@ virStorageVolGetKey(virStorageVolPtr vol)
*/ */
virStorageVolPtr virStorageVolPtr
virStorageVolCreateXML(virStoragePoolPtr pool, virStorageVolCreateXML(virStoragePoolPtr pool,
const char *xmldesc, const char *xmlDesc,
unsigned int flags) unsigned int flags)
{ {
VIR_DEBUG("pool=%p, flags=%x", pool, flags); VIR_DEBUG("pool=%p, xmlDesc=%s, flags=%x", pool, xmlDesc, flags);
virResetLastError(); virResetLastError();
@ -13322,7 +13322,7 @@ virStorageVolCreateXML(virStoragePoolPtr pool,
return NULL; return NULL;
} }
virCheckNonNullArgGoto(xmldesc, error); virCheckNonNullArgGoto(xmlDesc, error);
if (pool->conn->flags & VIR_CONNECT_RO) { if (pool->conn->flags & VIR_CONNECT_RO) {
virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__); virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
@ -13331,7 +13331,7 @@ virStorageVolCreateXML(virStoragePoolPtr pool,
if (pool->conn->storageDriver && pool->conn->storageDriver->volCreateXML) { if (pool->conn->storageDriver && pool->conn->storageDriver->volCreateXML) {
virStorageVolPtr ret; virStorageVolPtr ret;
ret = pool->conn->storageDriver->volCreateXML (pool, xmldesc, flags); ret = pool->conn->storageDriver->volCreateXML (pool, xmlDesc, flags);
if (!ret) if (!ret)
goto error; goto error;
return ret; return ret;
@ -13348,7 +13348,7 @@ error:
/** /**
* virStorageVolCreateXMLFrom: * virStorageVolCreateXMLFrom:
* @pool: pointer to parent pool for the new volume * @pool: pointer to parent pool for the new volume
* @xmldesc: description of volume to create * @xmlDesc: description of volume to create
* @clonevol: storage volume to use as input * @clonevol: storage volume to use as input
* @flags: extra flags; not used yet, so callers should always pass 0 * @flags: extra flags; not used yet, so callers should always pass 0
* *
@ -13361,11 +13361,12 @@ error:
*/ */
virStorageVolPtr virStorageVolPtr
virStorageVolCreateXMLFrom(virStoragePoolPtr pool, virStorageVolCreateXMLFrom(virStoragePoolPtr pool,
const char *xmldesc, const char *xmlDesc,
virStorageVolPtr clonevol, virStorageVolPtr clonevol,
unsigned int flags) unsigned int flags)
{ {
VIR_DEBUG("pool=%p, flags=%x, clonevol=%p", pool, flags, clonevol); VIR_DEBUG("pool=%p, xmlDesc=%s, clonevol=%p, flags=%x",
pool, xmlDesc, clonevol, flags);
virResetLastError(); virResetLastError();
@ -13380,7 +13381,7 @@ virStorageVolCreateXMLFrom(virStoragePoolPtr pool,
goto error; goto error;
} }
virCheckNonNullArgGoto(xmldesc, error); virCheckNonNullArgGoto(xmlDesc, error);
if (pool->conn->flags & VIR_CONNECT_RO || if (pool->conn->flags & VIR_CONNECT_RO ||
clonevol->conn->flags & VIR_CONNECT_RO) { clonevol->conn->flags & VIR_CONNECT_RO) {
@ -13391,7 +13392,7 @@ virStorageVolCreateXMLFrom(virStoragePoolPtr pool,
if (pool->conn->storageDriver && if (pool->conn->storageDriver &&
pool->conn->storageDriver->volCreateXMLFrom) { pool->conn->storageDriver->volCreateXMLFrom) {
virStorageVolPtr ret; virStorageVolPtr ret;
ret = pool->conn->storageDriver->volCreateXMLFrom (pool, xmldesc, ret = pool->conn->storageDriver->volCreateXMLFrom (pool, xmlDesc,
clonevol, flags); clonevol, flags);
if (!ret) if (!ret)
goto error; goto error;