From 4585bb121b4acfab2f34237f1d0e9ea6077110c0 Mon Sep 17 00:00:00 2001 From: Tianyu Li Date: Tue, 29 Aug 2023 07:59:12 +0000 Subject: perfmon: fix perf_user_access_enabled type perf_user_access_enabled is defined as u8, clib_sysfs_read format type is %u, this is for unsigned int, change type from u8 to u32. Type: fix Fixes: 268d7be66b8b ("perfmon: enable perfmon plugin for Arm") Signed-off-by: Tianyu Li Change-Id: I48ec00605e496d185370e77d894d7852d6d22124 --- src/plugins/perfmon/arm/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/perfmon/arm/events.c') diff --git a/src/plugins/perfmon/arm/events.c b/src/plugins/perfmon/arm/events.c index bf73ad6e896..f2406b3ea05 100644 --- a/src/plugins/perfmon/arm/events.c +++ b/src/plugins/perfmon/arm/events.c @@ -75,7 +75,7 @@ arm_init (vlib_main_t *vm, perfmon_source_t *src) - if the file exists and is 0, user access needs to be granted with 'sudo sysctl kernel/perf_user_access=1' */ - u8 perf_user_access_enabled; + u32 perf_user_access_enabled; char *path = "/proc/sys/kernel/perf_user_access"; err = clib_sysfs_read (path, "%u", &perf_user_access_enabled); if (err) -- cgit 1.2.3-korg