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

Keng-Yu Lin kengyu at canonical.com
Tue Jan 29 06:30:13 UTC 2013


On Tue, Jan 22, 2013 at 8:03 PM, Colin King <colin.king at canonical.com> 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 },
>  };
>
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list