storage: Fix build due to recent storage backend code movement
Commit id '5f07c3c07' broke the freebsd build in the libvirt CI test environment because the UMOUNT was not defined unless WITH_STORAGE_FS is defined. So remove the virStorageBackendUmountLocal from storage_util.c,h and restore the code back in the storage_backend_fs.c and _vstorage.c modules.
This commit is contained in:
parent
a55ddc8774
commit
448e2d5e94
@ -452,6 +452,8 @@ static int
|
|||||||
virStorageBackendFileSystemStop(virConnectPtr conn ATTRIBUTE_UNUSED,
|
virStorageBackendFileSystemStop(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
virStoragePoolObjPtr pool)
|
virStoragePoolObjPtr pool)
|
||||||
{
|
{
|
||||||
|
virCommandPtr cmd = NULL;
|
||||||
|
int ret = -1;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (virStorageBackendFileSystemIsValid(pool) < 0)
|
if (virStorageBackendFileSystemIsValid(pool) < 0)
|
||||||
@ -461,7 +463,14 @@ virStorageBackendFileSystemStop(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
if ((rc = virStorageBackendFileSystemIsMounted(pool)) != 1)
|
if ((rc = virStorageBackendFileSystemIsMounted(pool)) != 1)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
return virStorageBackendUmountLocal(pool);
|
cmd = virCommandNewArgList(UMOUNT, pool->def->target.path, NULL);
|
||||||
|
if (virCommandRun(cmd, NULL) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
cleanup:
|
||||||
|
virCommandFree(cmd);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* WITH_STORAGE_FS */
|
#endif /* WITH_STORAGE_FS */
|
||||||
|
|
||||||
|
@ -125,13 +125,22 @@ static int
|
|||||||
virStorageBackendVzPoolStop(virConnectPtr conn ATTRIBUTE_UNUSED,
|
virStorageBackendVzPoolStop(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
virStoragePoolObjPtr pool)
|
virStoragePoolObjPtr pool)
|
||||||
{
|
{
|
||||||
|
virCommandPtr cmd = NULL;
|
||||||
|
int ret = -1;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Short-circuit if already unmounted */
|
/* Short-circuit if already unmounted */
|
||||||
if ((rc = virStorageBackendVzIsMounted(pool)) != 1)
|
if ((rc = virStorageBackendVzIsMounted(pool)) != 1)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
return virStorageBackendUnmountLocal(pool);
|
cmd = virCommandNewArgList(UMOUNT, pool->def->target.path, NULL);
|
||||||
|
if (virCommandRun(cmd, NULL) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
cleanup:
|
||||||
|
virCommandFree(cmd);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2803,24 +2803,6 @@ virStorageBackendBuildLocal(virStoragePoolObjPtr pool)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
virStorageBackendUmountLocal(virStoragePoolObjPtr pool)
|
|
||||||
{
|
|
||||||
int ret = -1;
|
|
||||||
virCommandPtr cmd = virCommandNewArgList(UMOUNT, pool->def->target.path,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (virCommandRun(cmd, NULL) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
virCommandFree(cmd);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @conn connection to report errors against
|
* @conn connection to report errors against
|
||||||
* @pool storage pool to delete
|
* @pool storage pool to delete
|
||||||
|
@ -87,8 +87,6 @@ int virStorageBackendVolWipeLocal(virConnectPtr conn,
|
|||||||
/* Local/Common Storage Pool Backend APIs */
|
/* Local/Common Storage Pool Backend APIs */
|
||||||
int virStorageBackendBuildLocal(virStoragePoolObjPtr pool);
|
int virStorageBackendBuildLocal(virStoragePoolObjPtr pool);
|
||||||
|
|
||||||
int virStorageBackendUmountLocal(virStoragePoolObjPtr pool);
|
|
||||||
|
|
||||||
int virStorageBackendDeleteLocal(virConnectPtr conn,
|
int virStorageBackendDeleteLocal(virConnectPtr conn,
|
||||||
virStoragePoolObjPtr pool,
|
virStoragePoolObjPtr pool,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user