Re: Shorten efi regions output
From: Borislav Petkov
Date: Tue Dec 09 2014 - 07:48:55 EST
On Tue, Dec 09, 2014 at 01:42:44PM +0100, Ard Biesheuvel wrote:
> The |] thing is easily fixed, though.
>
> [...]
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index 8590099ac148..6734072980ee 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> [...]
> > @@ -490,15 +490,15 @@ char * __init efi_md_typeattr_format(char *buf, size_t size,
> > snprintf(pos, size, "|attr=0x%016llx]",
> > (unsigned long long)attr);
> > else
> > - snprintf(pos, size, "|%3s|%2s|%2s|%2s|%3s|%2s|%2s|%2s|%2s]",
> > - attr & EFI_MEMORY_RUNTIME ? "RUN" : "",
> > - attr & EFI_MEMORY_XP ? "XP" : "",
> > - attr & EFI_MEMORY_RP ? "RP" : "",
> > - attr & EFI_MEMORY_WP ? "WP" : "",
> > - attr & EFI_MEMORY_UCE ? "UCE" : "",
> > - attr & EFI_MEMORY_WB ? "WB" : "",
> > - attr & EFI_MEMORY_WT ? "WT" : "",
> > - attr & EFI_MEMORY_WC ? "WC" : "",
> > - attr & EFI_MEMORY_UC ? "UC" : "");
> > + snprintf(pos, size, "|%s%s%s%s%s%s%s%s%s]",
>
> Drop the leading | here
>
> > + attr & EFI_MEMORY_RUNTIME ? "RT|" : "",
> > + attr & EFI_MEMORY_XP ? "XP|" : "",
> > + attr & EFI_MEMORY_RP ? "RP|" : "",
> > + attr & EFI_MEMORY_WP ? "WP|" : "",
> > + attr & EFI_MEMORY_UCE ? "UCE|" : "",
> > + attr & EFI_MEMORY_WB ? "WB|" : "",
> > + attr & EFI_MEMORY_WT ? "WT|" : "",
> > + attr & EFI_MEMORY_WC ? "WC|" : "",
> > + attr & EFI_MEMORY_UC ? "UC" : "");
>
> and move all the | to the beginning of the string here, including "UC"
Haha, of course! :-)
/me slaps forehead.
Thanks!
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/