From e5f81aa1d41a857b94d7d20fc8c60a889b4e8784 Mon Sep 17 00:00:00 2001 From: Adam Saponara Date: Mon, 8 Jul 2024 18:19:24 -0400 Subject: [PATCH] Support `ucodehints=-1` like `kernelhints=-1` Presently the options are to force the user to acknowledge, or disable the check entirely. This is a 3rd option, similar to `kernelhints=-1` that prints the same info without forcing user interaction. --- needrestart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/needrestart b/needrestart index f847985..77c362c 100755 --- a/needrestart +++ b/needrestart @@ -978,7 +978,15 @@ if($opt_w) { elsif($ucode_result == NRM_OBSOLETE) { push(@easy_hints, __ 'outdated processor microcode') if($opt_m eq 'e'); - if($nrconf{ucodehints}) { + if($nrconf{ucodehints} < 0) { + $ui->vspace(); + $ui->notice(__x( + 'The currently running processor microcode revision is {crev} which is not the expected microcode revision {erev}.', + crev => $ucode_vars{CURRENT}, + erev => $ucode_vars{AVAIL}, + )); + } + elsif($nrconf{ucodehints}) { $ui->announce_ucode(%ucode_vars); } }