提交 cf7392a0 编写于 作者: E Erik Skultety

storage: Remove unused attribute conn from 'checkPool' callback

In order to be able to use 'checkPool' inside functions which do not
have any connection reference, 'conn' attribute needs to be discarded
from the checkPool's signature, since it's not used by any storage backend
anyway.
上级 20aca080
......@@ -34,8 +34,7 @@
typedef char * (*virStorageBackendFindPoolSources)(virConnectPtr conn,
const char *srcSpec,
unsigned int flags);
typedef int (*virStorageBackendCheckPool)(virConnectPtr conn,
virStoragePoolObjPtr pool,
typedef int (*virStorageBackendCheckPool)(virStoragePoolObjPtr pool,
bool *active);
typedef int (*virStorageBackendStartPool)(virConnectPtr conn,
virStoragePoolObjPtr pool);
......
......@@ -533,8 +533,7 @@ virStorageBackendFileSystemUnmount(virStoragePoolObjPtr pool)
static int
virStorageBackendFileSystemCheck(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool,
virStorageBackendFileSystemCheck(virStoragePoolObjPtr pool,
bool *isActive)
{
if (pool->def->type == VIR_STORAGE_POOL_DIR) {
......
......@@ -236,8 +236,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static int
virStorageBackendISCSICheckPool(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool,
virStorageBackendISCSICheckPool(virStoragePoolObjPtr pool,
bool *isActive)
{
char *session = NULL;
......
......@@ -479,8 +479,7 @@ virStorageBackendLogicalFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
static int
virStorageBackendLogicalCheckPool(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool,
virStorageBackendLogicalCheckPool(virStoragePoolObjPtr pool,
bool *isActive)
{
*isActive = virFileExists(pool->def->target.path);
......
......@@ -245,8 +245,7 @@ virStorageBackendGetMaps(virStoragePoolObjPtr pool)
}
static int
virStorageBackendMpathCheckPool(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendMpathCheckPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
bool *isActive)
{
*isActive = virFileExists("/dev/mpath");
......
......@@ -844,8 +844,7 @@ deleteVport(virConnectPtr conn,
static int
virStorageBackendSCSICheckPool(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool,
virStorageBackendSCSICheckPool(virStoragePoolObjPtr pool,
bool *isActive)
{
char *path = NULL;
......
......@@ -41,8 +41,7 @@ VIR_LOG_INIT("storage.storage_backend_zfs");
static int
virStorageBackendZFSCheckPool(virConnectPtr conn ATTRIBUTE_UNUSED,
virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendZFSCheckPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
bool *isActive)
{
char *devpath;
......
......@@ -100,7 +100,7 @@ storageDriverAutostart(void)
}
if (backend->checkPool &&
backend->checkPool(conn, pool, &started) < 0) {
backend->checkPool(pool, &started) < 0) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to initialize storage pool '%s': %s"),
pool->def->name, err ? err->message :
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册