]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: introduce virPidFileAcquirePathFull
authorJán Tomko <jtomko@redhat.com>
Tue, 7 Mar 2023 13:38:20 +0000 (14:38 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 8 Mar 2023 11:16:56 +0000 (12:16 +0100)
For now, add the 'Full' suffix to virPidFileAcquirePath and make
virPidFileAcquirePath a 'wrapper' around it.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/libvirt_private.syms
src/util/virpidfile.c
src/util/virpidfile.h

index d5b1b9cb7216c7a9efce52f5d210bc8f671d93b1..4959dcec67cba639013deddc98cf60040c57b0f1 100644 (file)
@@ -3126,6 +3126,7 @@ virPerfReadEvent;
 # util/virpidfile.h
 virPidFileAcquire;
 virPidFileAcquirePath;
+virPidFileAcquirePathFull;
 virPidFileBuildPath;
 virPidFileConstructPath;
 virPidFileDelete;
index 5448a8652d45588fafa470be0971c3d079e374f1..742531379ec52e24398bb9e34c420bb2a94df8c2 100644 (file)
@@ -362,9 +362,9 @@ int virPidFileDelete(const char *dir,
     return virPidFileDeletePath(pidfile);
 }
 
-int virPidFileAcquirePath(const char *path,
-                          bool waitForLock,
-                          pid_t pid)
+int virPidFileAcquirePathFull(const char *path,
+                              bool waitForLock,
+                              pid_t pid)
 {
     int fd = -1;
     char pidstr[VIR_INT64_STR_BUFLEN];
@@ -445,6 +445,14 @@ int virPidFileAcquirePath(const char *path,
 }
 
 
+int virPidFileAcquirePath(const char *path,
+                          bool waitForLock,
+                          pid_t pid)
+{
+    return virPidFileAcquirePathFull(path, waitForLock, pid);
+}
+
+
 int virPidFileAcquire(const char *dir,
                       const char *name,
                       pid_t pid)
index ff4d31c9fdf9bae03412f82b05ae05f10ec63bd3..8c70f883be9677a702128a1da9417ca4e1ca24a5 100644 (file)
@@ -56,6 +56,9 @@ int virPidFileDelete(const char *dir,
                      const char *name);
 
 
+int virPidFileAcquirePathFull(const char *path,
+                              bool waitForLock,
+                              pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
 int virPidFileAcquirePath(const char *path,
                           bool waitForLock,
                           pid_t pid) G_GNUC_WARN_UNUSED_RESULT;