[PATCH 1/6] uefi: uefidump: Dump out variables containing kernel messages
Keng-Yu Lin
kengyu at canonical.com
Tue Sep 11 05:50:34 UTC 2012
On Mon, Sep 3, 2012 at 11:52 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The kernel can stash kernel log messages into UEFI variables,
> so add ability to dump these out too.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/uefi/uefidump/uefidump.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 1f71107..a9a0433 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -490,6 +490,25 @@ static void uefidump_info_bootdev(fwts_framework *fw, fwts_uefi_var *var)
> free(path);
> }
>
> +/*
> + * Dump kernel oops log messages
> + */
> +static void uefidump_info_dump_type0(fwts_framework *fw, fwts_uefi_var *var)
> +{
> + char *ptr = (char*)var->data;
> +
> + while (*ptr) {
> + char *start = ptr;
> + while (*ptr && *ptr != '\n')
> + ptr++;
> +
> + if (*ptr == '\n') {
> + *ptr++ = 0;
> + fwts_log_info_verbatum(fw, " KLog: %s.", start);
> + }
> + }
> +}
> +
> static uefidump_info uefidump_info_table[] = {
> { "PlatformLangCodes", uefidump_info_platform_langcodes },
> { "PlatformLang", uefidump_info_platform_lang },
> @@ -507,6 +526,7 @@ static uefidump_info uefidump_info_table[] = {
> { "Lang", uefidump_info_lang },
> { "Timeout", uefidump_info_timeout },
> { "Boot0", uefidump_info_bootdev },
> + { "dump-type0-", uefidump_info_dump_type0 },
Is the trailing dash intentional?
> { NULL, NULL }
> };
>
> --
> 1.7.10.4
>
>
> --
> fwts-devel mailing list
> fwts-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
More information about the fwts-devel
mailing list