From 02033b633a38c82a0522d7f59b81698f7c86431b Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 30 Jul 2013 10:49:53 -0600 Subject: [PATCH] maint: fix typo for SENTINEL * src/openvz/openvz_driver.c: Use correct spelling. * src/vmware/vmware_conf.c: Likewise. * src/vmware/vmware_conf.h: Likewise. * src/vmware/vmware_driver.c: Likewise. Signed-off-by: Eric Blake --- src/openvz/openvz_driver.c | 24 ++++++++++++------------ src/vmware/vmware_conf.c | 4 ++-- src/vmware/vmware_conf.h | 2 +- src/vmware/vmware_driver.c | 18 +++++++++--------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index de4e4ff801..d2686473c1 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -564,12 +564,12 @@ cleanup: * key value. This lets us declare the argv on the * stack and just splice in the domain name after */ -#define PROGRAM_SENTINAL ((char *)0x1) +#define PROGRAM_SENTINEL ((char *)0x1) static void openvzSetProgramSentinal(const char **prog, const char *key) { const char **tmp = prog; while (tmp && *tmp) { - if (*tmp == PROGRAM_SENTINAL) { + if (*tmp == PROGRAM_SENTINEL) { *tmp = key; break; } @@ -580,7 +580,7 @@ static void openvzSetProgramSentinal(const char **prog, const char *key) static int openvzDomainSuspend(virDomainPtr dom) { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINAL, "--suspend", NULL}; + const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINEL, "--suspend", NULL}; int ret = -1; openvzDriverLock(driver); @@ -618,7 +618,7 @@ cleanup: static int openvzDomainResume(virDomainPtr dom) { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINAL, "--resume", NULL}; + const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINEL, "--resume", NULL}; int ret = -1; openvzDriverLock(driver); @@ -658,7 +658,7 @@ openvzDomainShutdownFlags(virDomainPtr dom, unsigned int flags) { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = {VZCTL, "--quiet", "stop", PROGRAM_SENTINAL, NULL}; + const char *prog[] = {VZCTL, "--quiet", "stop", PROGRAM_SENTINEL, NULL}; int ret = -1; int status; @@ -721,7 +721,7 @@ static int openvzDomainReboot(virDomainPtr dom, { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = {VZCTL, "--quiet", "restart", PROGRAM_SENTINAL, NULL}; + const char *prog[] = {VZCTL, "--quiet", "restart", PROGRAM_SENTINEL, NULL}; int ret = -1; int status; @@ -1041,7 +1041,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml, virDomainDefPtr vmdef = NULL; virDomainObjPtr vm = NULL; virDomainPtr dom = NULL; - const char *progstart[] = {VZCTL, "--quiet", "start", PROGRAM_SENTINAL, NULL}; + const char *progstart[] = {VZCTL, "--quiet", "start", PROGRAM_SENTINEL, NULL}; virCheckFlags(0, NULL); @@ -1126,7 +1126,7 @@ openvzDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = {VZCTL, "--quiet", "start", PROGRAM_SENTINAL, NULL }; + const char *prog[] = {VZCTL, "--quiet", "start", PROGRAM_SENTINEL, NULL }; int ret = -1; int status; @@ -1180,7 +1180,7 @@ openvzDomainUndefineFlags(virDomainPtr dom, { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = { VZCTL, "--quiet", "destroy", PROGRAM_SENTINAL, NULL }; + const char *prog[] = { VZCTL, "--quiet", "destroy", PROGRAM_SENTINEL, NULL }; int ret = -1; int status; @@ -1228,7 +1228,7 @@ openvzDomainSetAutostart(virDomainPtr dom, int autostart) { struct openvz_driver *driver = dom->conn->privateData; virDomainObjPtr vm; - const char *prog[] = { VZCTL, "--quiet", "set", PROGRAM_SENTINAL, + const char *prog[] = { VZCTL, "--quiet", "set", PROGRAM_SENTINEL, "--onboot", autostart ? "yes" : "no", "--save", NULL }; int ret = -1; @@ -1326,7 +1326,7 @@ static int openvzDomainSetVcpusInternal(virDomainObjPtr vm, unsigned int nvcpus) { char str_vcpus[32]; - const char *prog[] = { VZCTL, "--quiet", "set", PROGRAM_SENTINAL, + const char *prog[] = { VZCTL, "--quiet", "set", PROGRAM_SENTINEL, "--cpus", str_vcpus, "--save", NULL }; unsigned int pcpus; pcpus = openvzGetNodeCPUs(); @@ -1685,7 +1685,7 @@ openvzDomainSetMemoryInternal(virDomainObjPtr vm, unsigned long long mem) { char str_mem[16]; - const char *prog[] = { VZCTL, "--quiet", "set", PROGRAM_SENTINAL, + const char *prog[] = { VZCTL, "--quiet", "set", PROGRAM_SENTINEL, "--kmemsize", str_mem, "--save", NULL }; diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 23da92deba..e00c66c255 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c @@ -205,7 +205,7 @@ vmwareSetSentinal(const char **prog, const char *key) const char **tmp = prog; while (tmp && *tmp) { - if (*tmp == PROGRAM_SENTINAL) { + if (*tmp == PROGRAM_SENTINEL) { *tmp = key; break; } @@ -392,7 +392,7 @@ int vmwareMoveFile(char *srcFile, char *dstFile) { const char *cmdmv[] = - { "mv", PROGRAM_SENTINAL, PROGRAM_SENTINAL, NULL }; + { "mv", PROGRAM_SENTINEL, PROGRAM_SENTINEL, NULL }; if (!virFileExists(srcFile)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("file %s does not exist"), diff --git a/src/vmware/vmware_conf.h b/src/vmware/vmware_conf.h index cb11acabdc..6666eafaf7 100644 --- a/src/vmware/vmware_conf.h +++ b/src/vmware/vmware_conf.h @@ -28,7 +28,7 @@ # include "virthread.h" # define VIR_FROM_THIS VIR_FROM_VMWARE -# define PROGRAM_SENTINAL ((char *)0x1) +# define PROGRAM_SENTINEL ((char *)0x1) # define TYPE_PLAYER 0 # define TYPE_WORKSTATION 1 diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 988552fcb4..74591d6f8e 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -252,8 +252,8 @@ vmwareStopVM(struct vmware_driver *driver, virDomainShutoffReason reason) { const char *cmd[] = { - VMRUN, "-T", PROGRAM_SENTINAL, "stop", - PROGRAM_SENTINAL, "soft", NULL + VMRUN, "-T", PROGRAM_SENTINEL, "stop", + PROGRAM_SENTINEL, "soft", NULL }; vmwareSetSentinal(cmd, vmw_types[driver->type]); @@ -273,8 +273,8 @@ static int vmwareStartVM(struct vmware_driver *driver, virDomainObjPtr vm) { const char *cmd[] = { - VMRUN, "-T", PROGRAM_SENTINAL, "start", - PROGRAM_SENTINAL, PROGRAM_SENTINAL, NULL + VMRUN, "-T", PROGRAM_SENTINEL, "start", + PROGRAM_SENTINEL, PROGRAM_SENTINEL, NULL }; const char *vmxPath = ((vmwareDomainPtr) vm->privateData)->vmxPath; @@ -446,8 +446,8 @@ vmwareDomainSuspend(virDomainPtr dom) virDomainObjPtr vm; const char *cmd[] = { - VMRUN, "-T", PROGRAM_SENTINAL, "pause", - PROGRAM_SENTINAL, NULL + VMRUN, "-T", PROGRAM_SENTINEL, "pause", + PROGRAM_SENTINEL, NULL }; int ret = -1; @@ -495,7 +495,7 @@ vmwareDomainResume(virDomainPtr dom) virDomainObjPtr vm; const char *cmd[] = { - VMRUN, "-T", PROGRAM_SENTINAL, "unpause", PROGRAM_SENTINAL, + VMRUN, "-T", PROGRAM_SENTINEL, "unpause", PROGRAM_SENTINEL, NULL }; int ret = -1; @@ -544,8 +544,8 @@ vmwareDomainReboot(virDomainPtr dom, unsigned int flags) const char * vmxPath = NULL; virDomainObjPtr vm; const char *cmd[] = { - VMRUN, "-T", PROGRAM_SENTINAL, - "reset", PROGRAM_SENTINAL, "soft", NULL + VMRUN, "-T", PROGRAM_SENTINEL, + "reset", PROGRAM_SENTINEL, "soft", NULL }; int ret = -1; -- GitLab