Skip to contentSkip to conversation

xen: Fix the figlet banner

PATCH In review Andrew Cooper 2 participants 2 messages Jul 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: Fix the figlet banner

4.20 is just wide enough to cause figlet to split the banner onto two lines:

   __  __
   \ \/ /___ _ __
    \  // _ \ '_ \
    /  \  __/ | | |
   /_/\_\___|_| |_|

   _  _    ____   ___                     _        _     _
  | || |  |___ \ / _ \    _   _ _ __  ___| |_ __ _| |__ | | ___
  | || |_   __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
  |__   _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | |  __/
     |_|(_)_____|\___/    \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

Instruct figlet to use 100 column width, rather than 80, resulting in:

   __  __            _  _    ____   ___                     _        _     _
   \ \/ /___ _ __   | || |  |___ \ / _ \    _   _ _ __  ___| |_ __ _| |__ | | ___
    \  // _ \ '_ \  | || |_   __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
    /  \  __/ | | | |__   _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | |  __/
   /_/\_\___|_| |_|    |_|(_)_____|\___/    \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

While fixing this, also fix a rendering error in the non-figlet case; while a leading space looks better for figlet, it looks very wrong for the simple one-line case.

---
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/build.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/build.mk +2 -2
index 0f490ca71be1..942ff3867fdb 100644
@@ -1,9 +1,9 @@
 quiet_cmd_banner = BANNER  $@
 define cmd_banner
     if command -v figlet >/dev/null 2>&1 ; then \
-	echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > [email protected]; \
+	echo " Xen $(XEN_FULLVERSION)" | figlet -w 100 -f $< > [email protected]; \
     else \
-	echo " Xen $(XEN_FULLVERSION)" > [email protected]; \
+	echo "Xen $(XEN_FULLVERSION)" > [email protected]; \
     fi; \
     mv -f [email protected] $@
 endef

base-commit: ff652ed5dcd797a46c84258255dfd429ae68a2d6

Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Andrew Cooper

4.20 is just wide enough to cause figlet to split the banner onto two lines:

   __  __
   \ \/ /___ _ __
    \  // _ \ '_ \
    /  \  __/ | | |
   /_/\_\___|_| |_|

   _  _    ____   ___                     _        _     _
  | || |  |___ \ / _ \    _   _ _ __  ___| |_ __ _| |__ | | ___
  | || |_   __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
  |__   _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | |  __/
     |_|(_)_____|\___/    \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

Instruct figlet to use 100 column width, rather than 80, resulting in:

   __  __            _  _    ____   ___                     _        _     _
   \ \/ /___ _ __   | || |  |___ \ / _ \    _   _ _ __  ___| |_ __ _| |__ | | ___
    \  // _ \ '_ \  | || |_   __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
    /  \  __/ | | | |__   _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | |  __/
   /_/\_\___|_| |_|    |_|(_)_____|\___/    \__,_|_| |_|___/\__\__,_|_.__/|_|\___|
Quoted 5 lines

While fixing this, also fix a rendering error in the non-figlet case; while a leading space looks better for figlet, it looks very wrong for the simple one-line case.