mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
virgl: Replace the usage of os_get_process_name with util_get_process_name
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21034>
This commit is contained in:
parent
b3feb48548
commit
61a7eacf3e
1 changed files with 5 additions and 4 deletions
|
|
@ -28,8 +28,8 @@
|
|||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <os/os_process.h>
|
||||
#include <util/format/u_format.h>
|
||||
#include <util/u_process.h>
|
||||
|
||||
#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")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue