[PATCH v2 2/9] qemu_vhost_user_gpu: Export qemuVhostUserGPUGetPid()

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

 



In near future it will be necessary to know the PID of
vhost-user-gpu process for QEMU. Export the function that does
just that (qemuVhostUserGPUGetPid()).

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/qemu/qemu_vhost_user_gpu.c | 2 +-
 src/qemu/qemu_vhost_user_gpu.h | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c
index 7c5be4098e..c8956835b0 100644
--- a/src/qemu/qemu_vhost_user_gpu.c
+++ b/src/qemu/qemu_vhost_user_gpu.c
@@ -60,7 +60,7 @@ qemuVhostUserGPUCreatePidFilename(const char *stateDir,
  * If the PID was not still alive, zero will be returned, and @pid will be
  * set to -1;
  */
-static int
+int
 qemuVhostUserGPUGetPid(const char *stateDir,
                        const char *shortName,
                        const char *alias,
diff --git a/src/qemu/qemu_vhost_user_gpu.h b/src/qemu/qemu_vhost_user_gpu.h
index 2b86982cb8..ffbb844437 100644
--- a/src/qemu/qemu_vhost_user_gpu.h
+++ b/src/qemu/qemu_vhost_user_gpu.h
@@ -39,6 +39,14 @@ void qemuExtVhostUserGPUStop(virQEMUDriver *driver,
                              virDomainVideoDef *video)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
+int
+qemuVhostUserGPUGetPid(const char *stateDir,
+                       const char *shortName,
+                       const char *alias,
+                       pid_t *pid)
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
+    G_GNUC_WARN_UNUSED_RESULT;
+
 int
 qemuExtVhostUserGPUSetupCgroup(virQEMUDriver *driver,
                                virDomainDef *def,
-- 
2.35.1




[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]

  Powered by Linux