From patchwork Tue Jan 22 12:03:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: kernel: version: gather kernel boot command line Date: Tue, 22 Jan 2013 02:03:08 -0000 From: Colin King X-Patchwork-Id: 214536 Message-Id: <1358856189-21776-1-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com From: Colin Ian King We're seeing some logs where fwts is being used with BIOS or ACPI options being tweaked by users and it would be very helpful if fwts can gather this information in the log. Add this to the kernel version information gathering test, insert it before the kernel ACPI version subtest. Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Alex Hung --- src/kernel/version/version.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/kernel/version/version.c b/src/kernel/version/version.c index 3c7fb29..0485ece 100644 --- a/src/kernel/version/version.c +++ b/src/kernel/version/version.c @@ -61,6 +61,22 @@ static int version_test3(fwts_framework *fw) { char *str; + if ((str = fwts_get("/proc/cmdline")) == NULL) + fwts_log_info(fw, "Cannot get version info from /proc/cmdline"); + else { + fwts_chop_newline(str); + fwts_log_info(fw, "Kernel boot command line: %s", str); + free(str); + } + fwts_infoonly(fw); + + return FWTS_OK; +} + +static int version_test4(fwts_framework *fw) +{ + char *str; + if (((str = fwts_get("/sys/module/acpi/parameters/acpica_version")) == NULL) && ((str = fwts_get("/proc/acpi/info")) == NULL)) fwts_log_info(fw, @@ -80,7 +96,8 @@ static int version_test3(fwts_framework *fw) static fwts_framework_minor_test version_tests[] = { { version_test1, "Gather kernel signature." }, { version_test2, "Gather kernel system information." }, - { version_test3, "Gather APCI driver version." }, + { version_test3, "Gather kernel boot command line." }, + { version_test4, "Gather APCI driver version." }, { NULL, NULL }, };