1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

util: introduce virPidFileAcquirePathFull

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>
This commit is contained in:
Ján Tomko 2023-03-07 14:38:20 +01:00
parent 1cc783bc44
commit 5af4e467af
3 changed files with 15 additions and 3 deletions

View File

@ -3126,6 +3126,7 @@ virPerfReadEvent;
# util/virpidfile.h
virPidFileAcquire;
virPidFileAcquirePath;
virPidFileAcquirePathFull;
virPidFileBuildPath;
virPidFileConstructPath;
virPidFileDelete;

View 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)

View 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;