Add a new API to search the currently defined pool list for a pool with
a matching UUID and return the locked pool object pointer.
virStoragePoolDefFree(pooldef);
return ret;
}
+
+
+/*
+ * virStoragePoolObjFindPoolByUUID
+ * @uuid: The uuid to lookup
+ *
+ * Using the passed @uuid, search the driver pools for a matching uuid.
+ * If found, then lock the pool
+ *
+ * Returns NULL if pool is not found or a locked pool object pointer
+ */
+virStoragePoolObjPtr
+virStoragePoolObjFindPoolByUUID(const unsigned char *uuid)
+{
+ virStoragePoolObjPtr pool;
+
+ storageDriverLock();
+ pool = virStoragePoolObjFindByUUID(&driver->pools, uuid);
+ storageDriverUnlock();
+ return pool;
+}
int virStorageTranslateDiskSourcePool(virConnectPtr conn,
virDomainDiskDefPtr def);
+virStoragePoolObjPtr virStoragePoolObjFindPoolByUUID(const unsigned char *uuid)
+ ATTRIBUTE_NONNULL(1);
+
virStoragePoolPtr
storagePoolLookupByTargetPath(virConnectPtr conn,
const char *path)