From: Tomohiro Misono Date: Thu, 8 Aug 2024 09:21:17 +0000 (+0000) Subject: ras-events: fix -d option to work again X-Git-Tag: v0.8.2~36 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c3088842e882ec923c5cbaad87124599c3ea0f94;p=users%2Fmchehab%2Frasdaemon.git 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 --- 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 ? "" : "!",