Indent top-level labels by one space in src/locking/

This commit is contained in:
Ján Tomko 2014-03-25 07:51:47 +01:00
parent d46f4a3c1f
commit 40cc610a9d
8 changed files with 49 additions and 49 deletions

View File

@ -155,7 +155,7 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
return lock;
error:
error:
virLockManagerFree(lock);
return NULL;
}
@ -270,7 +270,7 @@ int virDomainLockDiskAttach(virLockManagerPluginPtr plugin,
ret = 0;
cleanup:
cleanup:
virLockManagerFree(lock);
return ret;
@ -297,7 +297,7 @@ int virDomainLockDiskDetach(virLockManagerPluginPtr plugin,
ret = 0;
cleanup:
cleanup:
virLockManagerFree(lock);
return ret;
@ -327,7 +327,7 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
ret = 0;
cleanup:
cleanup:
virLockManagerFree(lock);
return ret;
@ -354,7 +354,7 @@ int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
ret = 0;
cleanup:
cleanup:
virLockManagerFree(lock);
return ret;

View File

@ -164,7 +164,7 @@ virLockDaemonNew(virLockDaemonConfigPtr config, bool privileged)
return lockd;
error:
error:
virLockDaemonFree(lockd);
return NULL;
}
@ -246,7 +246,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged)
return lockd;
error:
error:
virLockDaemonFree(lockd);
return NULL;
}
@ -396,7 +396,7 @@ virLockDaemonPidFilePath(bool privileged,
return 0;
error:
error:
return -1;
}
@ -431,7 +431,7 @@ virLockDaemonUnixSocketPaths(bool privileged,
}
return 0;
error:
error:
return -1;
}
@ -551,7 +551,7 @@ virLockDaemonSetupLogging(virLockDaemonConfigPtr config,
return 0;
error:
error:
return -1;
}
@ -816,7 +816,7 @@ virLockDaemonClientNew(virNetServerClientPtr client,
return priv;
error:
error:
virMutexDestroy(&priv->lock);
VIR_FREE(priv);
return NULL;
@ -871,7 +871,7 @@ virLockDaemonClientNewPostExecRestart(virNetServerClientPtr client,
}
return priv;
error:
error:
virLockDaemonClientFree(priv);
return NULL;
}
@ -917,7 +917,7 @@ virLockDaemonClientPreExecRestart(virNetServerClientPtr client ATTRIBUTE_UNUSED,
return object;
error:
error:
virJSONValueFree(object);
return NULL;
}
@ -955,7 +955,7 @@ virLockDaemonExecRestartStatePath(bool privileged,
return 0;
error:
error:
return -1;
}
@ -1028,7 +1028,7 @@ virLockDaemonPostExecRestart(const char *state_file,
ret = 1;
cleanup:
cleanup:
unlink(state_file);
VIR_FREE(wantmagic);
VIR_FREE(state);
@ -1123,7 +1123,7 @@ virLockDaemonPreExecRestart(const char *state_file,
abort(); /* This should be impossible to reach */
cleanup:
cleanup:
VIR_FREE(pairs);
VIR_FREE(state);
virJSONValueFree(object);
@ -1451,7 +1451,7 @@ int main(int argc, char **argv) {
else
ret = 0;
cleanup:
cleanup:
virObjectUnref(lockProgram);
virLockDaemonFree(lockDaemon);
if (statuswrite != -1) {
@ -1472,7 +1472,7 @@ cleanup:
VIR_FREE(run_dir);
return ret;
no_memory:
no_memory:
VIR_ERROR(_("Can't allocate memory"));
exit(EXIT_FAILURE);
}

View File

@ -102,7 +102,7 @@ virLockDaemonConfigFilePath(bool privileged, char **configfile)
return 0;
error:
error:
return -1;
}
@ -144,7 +144,7 @@ virLockDaemonConfigLoadOptions(virLockDaemonConfigPtr data,
return 0;
error:
error:
return -1;
}

View File

@ -88,7 +88,7 @@ virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server ATTRIBUTE_UNU
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -137,7 +137,7 @@ virLockSpaceProtocolDispatchCreateResource(virNetServerPtr server ATTRIBUTE_UNUS
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -186,7 +186,7 @@ virLockSpaceProtocolDispatchDeleteResource(virNetServerPtr server ATTRIBUTE_UNUS
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -242,7 +242,7 @@ virLockSpaceProtocolDispatchNew(virNetServerPtr server ATTRIBUTE_UNUSED,
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -288,7 +288,7 @@ virLockSpaceProtocolDispatchRegister(virNetServerPtr server ATTRIBUTE_UNUSED,
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -339,7 +339,7 @@ virLockSpaceProtocolDispatchReleaseResource(virNetServerPtr server ATTRIBUTE_UNU
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -378,7 +378,7 @@ virLockSpaceProtocolDispatchRestrict(virNetServerPtr server ATTRIBUTE_UNUSED,
priv->restricted = true;
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
@ -423,7 +423,7 @@ virLockSpaceProtocolDispatchCreateLockSpace(virNetServerPtr server ATTRIBUTE_UNU
rv = 0;
cleanup:
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);

View File

@ -220,7 +220,7 @@ virLockManagerLockDaemonConnectionRegister(virLockManagerPtr lock,
rv = 0;
cleanup:
cleanup:
return rv;
}
@ -249,7 +249,7 @@ virLockManagerLockDaemonConnectionRestrict(virLockManagerPtr lock ATTRIBUTE_UNUS
rv = 0;
cleanup:
cleanup:
return rv;
}
@ -288,7 +288,7 @@ static virNetClientPtr virLockManagerLockDaemonConnectionNew(bool privileged,
return client;
error:
error:
VIR_FREE(lockdpath);
virNetClientClose(client);
virObjectUnref(client);
@ -315,7 +315,7 @@ virLockManagerLockDaemonConnect(virLockManagerPtr lock,
return client;
error:
error:
virNetClientClose(client);
virObjectUnref(client);
return NULL;
@ -355,7 +355,7 @@ static int virLockManagerLockDaemonSetupLockspace(const char *path)
rv = 0;
cleanup:
cleanup:
virObjectUnref(program);
virNetClientClose(client);
virObjectUnref(client);
@ -401,7 +401,7 @@ static int virLockManagerLockDaemonInit(unsigned int version,
return 0;
error:
error:
virLockManagerLockDaemonDeinit();
return -1;
}
@ -649,7 +649,7 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
return 0;
error:
error:
VIR_FREE(newLockspace);
VIR_FREE(newName);
return -1;
@ -715,7 +715,7 @@ static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
rv = 0;
cleanup:
cleanup:
if (rv != 0 && fd)
VIR_FORCE_CLOSE(*fd);
virNetClientClose(client);
@ -770,7 +770,7 @@ static int virLockManagerLockDaemonRelease(virLockManagerPtr lock,
rv = 0;
cleanup:
cleanup:
virNetClientClose(client);
virObjectUnref(client);
virObjectUnref(program);

View File

@ -334,7 +334,7 @@ static int virLockManagerSanlockSetupLockspace(void)
* either call a sanlock API that blocks us until lockspace changes state,
* or we can fallback to polling.
*/
retry:
retry:
if ((rv = sanlock_add_lockspace(&ls, 0)) < 0) {
if (-rv == EINPROGRESS && --retries) {
#ifdef HAVE_SANLOCK_INQ_LOCKSPACE
@ -373,9 +373,9 @@ retry:
VIR_FREE(dir);
return 0;
error_unlink:
error_unlink:
unlink(path);
error:
error:
VIR_FORCE_CLOSE(fd);
VIR_FREE(path);
VIR_FREE(dir);
@ -424,7 +424,7 @@ static int virLockManagerSanlockInit(unsigned int version,
return 0;
error:
error:
virLockManagerSanlockDeinit();
return -1;
}
@ -490,7 +490,7 @@ static int virLockManagerSanlockNew(virLockManagerPtr lock,
lock->privateData = priv;
return 0;
error:
error:
VIR_FREE(priv);
return -1;
}
@ -559,7 +559,7 @@ static int virLockManagerSanlockAddLease(virLockManagerPtr lock,
ret = 0;
cleanup:
cleanup:
if (ret == -1)
VIR_FREE(res);
return ret;
@ -624,7 +624,7 @@ static int virLockManagerSanlockAddDisk(virLockManagerPtr lock,
ret = 0;
cleanup:
cleanup:
if (ret == -1)
VIR_FREE(res);
VIR_FREE(path);
@ -707,7 +707,7 @@ static int virLockManagerSanlockCreateLease(struct sanlk_resource *res)
return 0;
error_unlink:
error_unlink:
unlink(res->disks[0].path);
VIR_FORCE_CLOSE(fd);
return -1;
@ -850,7 +850,7 @@ virLockManagerSanlockRegisterKillscript(int sock,
ret = 0;
cleanup:
cleanup:
VIR_FREE(args);
return ret;
}
@ -1002,7 +1002,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
return 0;
error:
error:
if (res_free) {
for (i = 0; i < res_count; i++) {
VIR_FREE(res_args[i]);

View File

@ -197,7 +197,7 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
VIR_FREE(modfile);
return plugin;
cleanup:
cleanup:
VIR_FREE(configFile);
VIR_FREE(plugin);
VIR_FREE(modfile);

View File

@ -105,7 +105,7 @@ main(int argc, char **argv)
break;
}
cleanup:
cleanup:
if (dom)
virDomainFree(dom);
if (conn)