
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