From 638a9e433ecd61e64761352dbec1fa4f5874c941 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:18:06 +0200 Subject: Merging upstream version 6.10.3. Signed-off-by: Daniel Baumann --- drivers/tty/vt/conmakehash.c | 15 +++++++++++++-- drivers/tty/vt/vc_screen.c | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'drivers/tty/vt') diff --git a/drivers/tty/vt/conmakehash.c b/drivers/tty/vt/conmakehash.c index cddd789fe4..dc2177fec7 100644 --- a/drivers/tty/vt/conmakehash.c +++ b/drivers/tty/vt/conmakehash.c @@ -76,7 +76,8 @@ static void addpair(int fp, int un) int main(int argc, char *argv[]) { FILE *ctbl; - char *tblname; + const char *tblname, *rel_tblname; + const char *abs_srctree; char buffer[65536]; int fontlen; int i, nuni, nent; @@ -101,6 +102,16 @@ int main(int argc, char *argv[]) } } + abs_srctree = getenv("abs_srctree"); + if (abs_srctree && !strncmp(abs_srctree, tblname, strlen(abs_srctree))) + { + rel_tblname = tblname + strlen(abs_srctree); + while (*rel_tblname == '/') + ++rel_tblname; + } + else + rel_tblname = tblname; + /* For now we assume the default font is always 256 characters. */ fontlen = 256; @@ -253,7 +264,7 @@ int main(int argc, char *argv[]) #include \n\ \n\ u8 dfont_unicount[%d] = \n\ -{\n\t", argv[1], fontlen); +{\n\t", rel_tblname, fontlen); for ( i = 0 ; i < fontlen ; i++ ) { diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 67e2cb7c96..da33c6c469 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c @@ -51,7 +51,7 @@ #include #define HEADER_SIZE 4u -#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) +#define CON_BUF_SIZE (IS_ENABLED(CONFIG_BASE_SMALL) ? 256 : PAGE_SIZE) /* * Our minor space: -- cgit v1.2.3