summaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/conmakehash.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:06 +0000
commit638a9e433ecd61e64761352dbec1fa4f5874c941 (patch)
treefdbff74a238d7a5a7d1cef071b7230bc064b9f25 /drivers/tty/vt/conmakehash.c
parentReleasing progress-linux version 6.9.12-1~progress7.99u1. (diff)
downloadlinux-638a9e433ecd61e64761352dbec1fa4f5874c941.tar.xz
linux-638a9e433ecd61e64761352dbec1fa4f5874c941.zip
Merging upstream version 6.10.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--drivers/tty/vt/conmakehash.c15
1 files changed, 13 insertions, 2 deletions
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 <linux/types.h>\n\
\n\
u8 dfont_unicount[%d] = \n\
-{\n\t", argv[1], fontlen);
+{\n\t", rel_tblname, fontlen);
for ( i = 0 ; i < fontlen ; i++ )
{