[sysprof/wip/chergert/sysprof-3] helpers: allow /sys/ access too



commit 214ec02da32cd5dbdd927e4e45948928cd8805d5
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 10 21:11:31 2019 -0700

    helpers: allow /sys/ access too

 src/helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/helpers.c b/src/helpers.c
index 7aea216..b806466 100644
--- a/src/helpers.c
+++ b/src/helpers.c
@@ -277,7 +277,7 @@ helpers_get_proc_file (const gchar  *path,
   canon = g_file_get_path (file);
 
   return g_file_is_native (file) &&
-         g_str_has_prefix (canon, "/proc/") &&
+         (g_str_has_prefix (canon, "/proc/") || g_str_has_prefix (canon, "/sys/")) &&
          g_file_get_contents (canon, contents, len, NULL);
 }
 


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