1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

storage: Clean up function header and reflow error message

Comply with the coding standard and save a few lines.
This commit is contained in:
Peter Krempa 2013-06-05 09:41:38 +02:00
parent b922c3d51a
commit 1d12ca3977

View File

@ -388,9 +388,8 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED,
virCheckFlags(0, -1); virCheckFlags(0, -1);
if (vol->target.encryption != NULL) { if (vol->target.encryption != NULL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
"%s", _("storage pool does not support encrypted " _("storage pool does not support encrypted volumes"));
"volumes"));
goto cleanup; goto cleanup;
} }
@ -529,9 +528,11 @@ cleanup:
return ret; return ret;
} }
static int virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool, static int
virStorageVolDefPtr vol, virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool,
virCommandPtr cmd) { virStorageVolDefPtr vol,
virCommandPtr cmd)
{
struct stat st; struct stat st;
gid_t gid; gid_t gid;
uid_t uid; uid_t uid;
@ -594,7 +595,8 @@ enum {
QEMU_IMG_BACKING_FORMAT_OPTIONS, QEMU_IMG_BACKING_FORMAT_OPTIONS,
}; };
static int virStorageBackendQEMUImgBackingFormat(const char *qemuimg) static int
virStorageBackendQEMUImgBackingFormat(const char *qemuimg)
{ {
char *help = NULL; char *help = NULL;
char *start; char *start;
@ -996,9 +998,9 @@ virStorageBackendGetBuildVolFromFunction(virStorageVolDefPtr vol,
inputvol->target.format != VIR_STORAGE_FILE_RAW)) { inputvol->target.format != VIR_STORAGE_FILE_RAW)) {
if ((tool_type = virStorageBackendFindFSImageTool(NULL)) < 0) { if ((tool_type = virStorageBackendFindFSImageTool(NULL)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
"%s", _("creation of non-raw file images is " _("creation of non-raw file images is "
"not supported without qemu-img.")); "not supported without qemu-img."));
return NULL; return NULL;
} }
@ -1013,7 +1015,8 @@ virStorageBackendGetBuildVolFromFunction(virStorageVolDefPtr vol,
virStorageBackendPtr virStorageBackendPtr
virStorageBackendForType(int type) { virStorageBackendForType(int type)
{
unsigned int i; unsigned int i;
for (i = 0; backends[i]; i++) for (i = 0; backends[i]; i++)
if (backends[i]->type == type) if (backends[i]->type == type)