[Libvir] Repository for work-in-progress storage patches
Richard W.M. Jones
rjones at redhat.com
Sat Jan 19 13:47:30 UTC 2008
This function confuses me a bit. It takes a virStoragePoolPtr as
parameter, but it only uses pool->conn. The other two
virStorageVolLookupBy* functions take a virConnectPtr directly.
virStorageVolPtr
virStorageVolLookupByName(virStoragePoolPtr pool,
const char *name)
{
DEBUG("pool=%p, name=%s", pool, name);
if (!VIR_IS_STORAGE_POOL(pool)) {
virLibConnError(NULL, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (NULL);
}
if (name == NULL) {
virLibConnError(pool->conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
if (pool->conn->storageDriver &&
pool->conn->storageDriver->volLookupByName)
return pool->conn->storageDriver->volLookupByName (pool, name);
/* ^^ is a red herring, since it's not implemented in
anything except the remote driver, hence useless */
virLibConnError (pool->conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
return NULL;
}
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080119/781c1afe/attachment-0001.bin>
More information about the libvir-list
mailing list