[PATCH] kernel: version: gather kernel boot command line

Alex Hung alex.hung at canonical.com
Thu Jan 31 06:20:12 UTC 2013


On 01/22/2013 08:03 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> 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 <colin.king at canonical.com>
> ---
>   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 },
>   };
>
>

I think it should be "ACPI" above, shouldn't it?

Other than that, I think it's is good.

Acked-by: Alex Hung <alex.hung at canonical.com>




More information about the fwts-devel mailing list