[v0.9.12-maint 2/9] Rename virKillProcess to virProcessKill

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Changing naming to follow the convention of "object" followed
by "action"

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
(cherry picked from commit cf470068a114fc7aab5e5de37d3f4fe3545bdc81)
---
 src/qemu/qemu_agent.c   | 2 +-
 src/qemu/qemu_monitor.c | 2 +-
 src/qemu/qemu_process.c | 2 +-
 src/uml/uml_driver.c    | 2 +-
 src/util/util.c         | 2 +-
 src/util/util.h         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index bc4ceff..1e3e327 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -224,7 +224,7 @@ qemuAgentOpenUnix(const char *monitor, pid_t cpid, bool *inProgress)
             break;

         if ((errno == ENOENT || errno == ECONNREFUSED) &&
-            virKillProcess(cpid, 0) == 0) {
+            virProcessKill(cpid, 0) == 0) {
             /* ENOENT       : Socket may not have shown up yet
              * ECONNREFUSED : Leftover socket hasn't been removed yet */
             continue;
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 68ecdb9..cfe1a25 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -294,7 +294,7 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid)
             break;

         if ((errno == ENOENT || errno == ECONNREFUSED) &&
-            virKillProcess(cpid, 0) == 0) {
+            virProcessKill(cpid, 0) == 0) {
             /* ENOENT       : Socket may not have shown up yet
              * ECONNREFUSED : Leftover socket hasn't been removed yet */
             continue;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d226067..7fc87f4 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3817,7 +3817,7 @@ qemuProcessKill(struct qemud_driver *driver,
             signum = 0; /* Just check for existence */
         }

-        if (virKillProcess(vm->pid, signum) < 0) {
+        if (virProcessKill(vm->pid, signum) < 0) {
             if (errno != ESRCH) {
                 char ebuf[1024];
                 VIR_WARN("Failed to terminate process %d with SIG%s: %s",
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 4e640ff..8db78b8 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1101,7 +1101,7 @@ static void umlShutdownVMDaemon(struct uml_driver *driver,
     if (!virDomainObjIsActive(vm))
         return;

-    virKillProcess(vm->pid, SIGTERM);
+    virProcessKill(vm->pid, SIGTERM);

     VIR_FORCE_CLOSE(priv->monitor);

diff --git a/src/util/util.c b/src/util/util.c
index 48358b2..bb15518 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -2133,7 +2133,7 @@ check_and_return:
 }

 /* send signal to a single process */
-int virKillProcess(pid_t pid, int sig)
+int virProcessKill(pid_t pid, int sig)
 {
     if (pid <= 1) {
         errno = ESRCH;
diff --git a/src/util/util.h b/src/util/util.h
index 85e8bd6..838bff7 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -225,7 +225,7 @@ static inline int getgid (void) { return 0; }

 char *virGetHostname(virConnectPtr conn);

-int virKillProcess(pid_t pid, int sig);
+int virProcessKill(pid_t pid, int sig);

 char *virGetUserDirectory(uid_t uid);
 char *virGetUserName(uid_t uid);
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]