From 61a7eacf3e98b6748d24f509c2268f3f17cd4d69 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 1 Feb 2023 15:14:22 +0800 Subject: [PATCH] virgl: Replace the usage of os_get_process_name with util_get_process_name Signed-off-by: Yonggang Luo Reviewed-by: Gert Wollny Part-of: --- src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c index 45f4d88..caec762 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include "virgl_vtest_winsys.h" #include "virgl_vtest_public.h" @@ -120,10 +120,11 @@ static int virgl_vtest_send_init(struct virgl_vtest_winsys *vws) uint32_t buf[VTEST_HDR_SIZE]; const char *nstr = "virtest"; char cmdline[64] = { 0 }; - int ret; + const char *proc_name = util_get_process_name(); - ret = os_get_process_name(cmdline, 63); - if (ret == FALSE) + if (proc_name) + strncpy(cmdline, proc_name, 63); + else strcpy(cmdline, nstr); #if defined(HAVE_PROGRAM_INVOCATION_NAME) if (!strcmp(cmdline, "shader_runner")) { -- 2.7.4