mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
conf: Use consistent function name prefixes for virstorageobj
Use "virStoragePoolObj" as a prefix for any external API in virstorageobj. Also a couple of functions were local to virstorageobj.c, so remove their external defs iin virstorageobj.h. NB: The virStorageVolDef* API's won't change. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
84017c5954
commit
a6d681485f
@ -124,7 +124,7 @@ virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
|
||||
}
|
||||
|
||||
|
||||
virStoragePoolObjPtr
|
||||
static virStoragePoolObjPtr
|
||||
virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool,
|
||||
virStoragePoolDefPtr def)
|
||||
{
|
||||
@ -279,8 +279,8 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools,
|
||||
}
|
||||
|
||||
|
||||
virStoragePoolObjPtr
|
||||
virStoragePoolLoadState(virStoragePoolObjListPtr pools,
|
||||
static virStoragePoolObjPtr
|
||||
virStoragePoolObjLoadState(virStoragePoolObjListPtr pools,
|
||||
const char *stateDir,
|
||||
const char *name)
|
||||
{
|
||||
@ -339,7 +339,7 @@ virStoragePoolLoadState(virStoragePoolObjListPtr pools,
|
||||
|
||||
|
||||
int
|
||||
virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
|
||||
virStoragePoolObjLoadAllState(virStoragePoolObjListPtr pools,
|
||||
const char *stateDir)
|
||||
{
|
||||
DIR *dir;
|
||||
@ -356,7 +356,8 @@ virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
|
||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||
continue;
|
||||
|
||||
if (!(pool = virStoragePoolLoadState(pools, stateDir, entry->d_name)))
|
||||
if (!(pool = virStoragePoolObjLoadState(pools, stateDir,
|
||||
entry->d_name)))
|
||||
continue;
|
||||
virStoragePoolObjUnlock(pool);
|
||||
}
|
||||
@ -367,7 +368,7 @@ virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
|
||||
|
||||
|
||||
int
|
||||
virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
|
||||
virStoragePoolObjLoadAllConfigs(virStoragePoolObjListPtr pools,
|
||||
const char *configDir,
|
||||
const char *autostartDir)
|
||||
{
|
||||
@ -697,7 +698,7 @@ virStoragePoolSourceISCSIMatch(virStoragePoolObjPtr matchpool,
|
||||
|
||||
|
||||
int
|
||||
virStoragePoolSourceFindDuplicate(virConnectPtr conn,
|
||||
virStoragePoolObjSourceFindDuplicate(virConnectPtr conn,
|
||||
virStoragePoolObjListPtr pools,
|
||||
virStoragePoolDefPtr def)
|
||||
{
|
||||
|
@ -77,19 +77,14 @@ virStoragePoolObjIsActive(virStoragePoolObjPtr pool)
|
||||
}
|
||||
|
||||
int
|
||||
virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
|
||||
virStoragePoolObjLoadAllConfigs(virStoragePoolObjListPtr pools,
|
||||
const char *configDir,
|
||||
const char *autostartDir);
|
||||
|
||||
int
|
||||
virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
|
||||
virStoragePoolObjLoadAllState(virStoragePoolObjListPtr pools,
|
||||
const char *stateDir);
|
||||
|
||||
virStoragePoolObjPtr
|
||||
virStoragePoolLoadState(virStoragePoolObjListPtr pools,
|
||||
const char *stateDir,
|
||||
const char *name);
|
||||
|
||||
virStoragePoolObjPtr
|
||||
virStoragePoolObjFindByUUID(virStoragePoolObjListPtr pools,
|
||||
const unsigned char *uuid);
|
||||
@ -98,10 +93,6 @@ virStoragePoolObjPtr
|
||||
virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
|
||||
const char *name);
|
||||
|
||||
virStoragePoolObjPtr
|
||||
virStoragePoolSourceFindDuplicateDevices(virStoragePoolObjPtr pool,
|
||||
virStoragePoolDefPtr def);
|
||||
|
||||
virStorageVolDefPtr
|
||||
virStorageVolDefFindByKey(virStoragePoolObjPtr pool,
|
||||
const char *key);
|
||||
@ -145,7 +136,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
|
||||
unsigned int check_active);
|
||||
|
||||
int
|
||||
virStoragePoolSourceFindDuplicate(virConnectPtr conn,
|
||||
virStoragePoolObjSourceFindDuplicate(virConnectPtr conn,
|
||||
virStoragePoolObjListPtr pools,
|
||||
virStoragePoolDefPtr def);
|
||||
|
||||
|
@ -983,8 +983,6 @@ virSecretObjSetValueSize;
|
||||
|
||||
|
||||
# conf/virstorageobj.h
|
||||
virStoragePoolLoadAllConfigs;
|
||||
virStoragePoolLoadAllState;
|
||||
virStoragePoolObjAssignDef;
|
||||
virStoragePoolObjClearVols;
|
||||
virStoragePoolObjDeleteDef;
|
||||
@ -993,12 +991,13 @@ virStoragePoolObjFindByUUID;
|
||||
virStoragePoolObjIsDuplicate;
|
||||
virStoragePoolObjListExport;
|
||||
virStoragePoolObjListFree;
|
||||
virStoragePoolObjLoadAllConfigs;
|
||||
virStoragePoolObjLoadAllState;
|
||||
virStoragePoolObjLock;
|
||||
virStoragePoolObjRemove;
|
||||
virStoragePoolObjSaveDef;
|
||||
virStoragePoolObjSourceFindDuplicate;
|
||||
virStoragePoolObjUnlock;
|
||||
virStoragePoolSourceFindDuplicate;
|
||||
virStoragePoolSourceFindDuplicateDevices;
|
||||
|
||||
|
||||
# cpu/cpu.h
|
||||
|
@ -267,11 +267,11 @@ storageStateInitialize(bool privileged,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (virStoragePoolLoadAllState(&driver->pools,
|
||||
if (virStoragePoolObjLoadAllState(&driver->pools,
|
||||
driver->stateDir) < 0)
|
||||
goto error;
|
||||
|
||||
if (virStoragePoolLoadAllConfigs(&driver->pools,
|
||||
if (virStoragePoolObjLoadAllConfigs(&driver->pools,
|
||||
driver->configDir,
|
||||
driver->autostartDir) < 0)
|
||||
goto error;
|
||||
@ -323,9 +323,9 @@ storageStateReload(void)
|
||||
return -1;
|
||||
|
||||
storageDriverLock();
|
||||
virStoragePoolLoadAllState(&driver->pools,
|
||||
virStoragePoolObjLoadAllState(&driver->pools,
|
||||
driver->stateDir);
|
||||
virStoragePoolLoadAllConfigs(&driver->pools,
|
||||
virStoragePoolObjLoadAllConfigs(&driver->pools,
|
||||
driver->configDir,
|
||||
driver->autostartDir);
|
||||
storageDriverAutostart();
|
||||
@ -695,7 +695,7 @@ storagePoolCreateXML(virConnectPtr conn,
|
||||
if (virStoragePoolObjIsDuplicate(&driver->pools, def, 1) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStoragePoolSourceFindDuplicate(conn, &driver->pools, def) < 0)
|
||||
if (virStoragePoolObjSourceFindDuplicate(conn, &driver->pools, def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if ((backend = virStorageBackendForType(def->type)) == NULL)
|
||||
@ -790,7 +790,7 @@ storagePoolDefineXML(virConnectPtr conn,
|
||||
if (virStoragePoolObjIsDuplicate(&driver->pools, def, 0) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStoragePoolSourceFindDuplicate(conn, &driver->pools, def) < 0)
|
||||
if (virStoragePoolObjSourceFindDuplicate(conn, &driver->pools, def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStorageBackendForType(def->type) == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user