lkml.org 
[lkml]   [2014]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Shorten efi regions output
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.
--


\
 
 \ /
  Last update: 2014-12-09 14:21    [W:0.111 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site