From 9f5dc24bf6d24a28024a0de7fe22725c30a959e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 19 Jun 2023 21:16:54 +0800 Subject: [PATCH] Bios: print version; don't print N/A --- src/detection/bios/bios_linux.c | 3 ++- src/modules/bios/bios.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/detection/bios/bios_linux.c b/src/detection/bios/bios_linux.c index 820cff62c..ae46e7c99 100644 --- a/src/detection/bios/bios_linux.c +++ b/src/detection/bios/bios_linux.c @@ -23,7 +23,8 @@ static bool hostValueSet(FFstrbuf* value) ffStrbufIgnCaseCompS(value, "Not Applicable") != 0 && ffStrbufIgnCaseCompS(value, "INVALID") != 0 && ffStrbufIgnCaseCompS(value, "Type1ProductConfigId") != 0 && - ffStrbufIgnCaseCompS(value, "All Series") != 0 + ffStrbufIgnCaseCompS(value, "All Series") != 0 && + ffStrbufIgnCaseCompS(value, "N/A") != 0 ; } diff --git a/src/modules/bios/bios.c b/src/modules/bios/bios.c index 70850a714..8c387f372 100644 --- a/src/modules/bios/bios.c +++ b/src/modules/bios/bios.c @@ -31,7 +31,10 @@ void ffPrintBios(FFinstance* instance, FFBiosOptions* options) if(options->moduleArgs.outputFormat.length == 0) { ffPrintLogoAndKey(instance, FF_BIOS_MODULE_NAME, 0, &options->moduleArgs.key, &options->moduleArgs.keyColor); - puts(bios.biosRelease.chars); + ffStrbufWriteTo(&bios.biosRelease, stdout); + if (bios.biosVersion.length) + printf(" (%s)", bios.biosVersion.chars); + putchar('\n'); } else {