From c3088842e882ec923c5cbaad87124599c3ea0f94 Mon Sep 17 00:00:00 2001 From: Tomohiro Misono Date: Thu, 8 Aug 2024 09:21:17 +0000 Subject: [PATCH] ras-events: fix -d option to work again It seems commit 3e9a59a184ca("Add dynamic switch of ras events support.") inadvertedly introduced the change to ignore -d option. Fix this so that -d will disable all trace events at once like before. Signed-off-by: Tomohiro Misono Signed-off-by: Mauro Carvalho Chehab --- ras-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ras-events.c b/ras-events.c index b6e80b2..fb405ca 100644 --- a/ras-events.c +++ b/ras-events.c @@ -193,7 +193,8 @@ static int __toggle_ras_mc_event(struct ras_events *ras, int fd, rc; char fname[MAX_PATH + 1]; - enable = is_disabled_event(group, event) ? 0 : 1; + if (enable) + enable = is_disabled_event(group, event) ? 0 : 1; snprintf(fname, sizeof(fname), "%s%s:%s\n", enable ? "" : "!", -- 2.49.0