From c81e2ff256071eb917fe5dbedcacafdf28e5fb92 Mon Sep 17 00:00:00 2001 From: Doozer Date: Sun, 1 Oct 2023 17:03:33 +0200 Subject: [PATCH] Remove dev_path and increase path_length --- custom_video_drmkms.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/custom_video_drmkms.cpp b/custom_video_drmkms.cpp index 4efe455..d2aa5ad 100755 --- a/custom_video_drmkms.cpp +++ b/custom_video_drmkms.cpp @@ -748,9 +748,8 @@ bool drmkms_timing::init() int drmkms_timing::get_master_fd() { - const size_t path_length = 15; - char dev_path[path_length]; - char procpath[50]; + const size_t path_length = 20; + char procpath[path_length]; char fullpath[512]; char* actualpath; struct stat st; @@ -799,7 +798,7 @@ int drmkms_timing::get_master_fd() continue; actualpath = realpath(fullpath, NULL); // Only check the device we expect - if (strncmp(dev_path, actualpath, path_length) != 0) + if (strncmp(m_drm_name, actualpath, path_length) != 0) { free(actualpath); continue;