Olivier Brunel
2015-Dec-27 17:34 UTC
[syslinux] [PATCH] keytab-lilo: update to support kbd 2.0.3 format
Since kbd 2.0.3 (commit 6ff47cf2) the format generated by 'loadkeys -m'
has
changed slightly, using "unsigned short" instead of
"u_short"
Signed-off-by: Olivier Brunel <jjk at jjacky.com>
---
utils/keytab-lilo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utils/keytab-lilo b/utils/keytab-lilo
index 9e34160..337a869 100755
--- a/utils/keytab-lilo
+++ b/utils/keytab-lilo
@@ -48,9 +48,9 @@ sub load_map
$empty = 1;
while (<FILE>) {
chop;
- if (/^(static\s+)?u_short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) {
+ if (/^(static\s+)?(u_|unsigned )short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) {
die "active at beginning of map" if defined $current;
- $current = $pfx.":".$2;
+ $current = $pfx.":".$3;
next;
}
undef $current if /^};\s*$/;
--
2.6.4
Ady
2015-Dec-27 22:34 UTC
[syslinux] [PATCH] keytab-lilo: update to support kbd 2.0.3 format
> Since kbd 2.0.3 (commit 6ff47cf2) the format generated by 'loadkeys -m' has > changed slightly, using "unsigned short" instead of "u_short" >How this change would affect users with older versions of kbd / loadkeys / or in older OSes? I mean, let's assume a user using a newer version of Syslinux (containing this proposed change in its keytab-lilo perl script) but with an older OS / older version of kbd / loadkeys / map files. TIA, Ady.
Jernej Simončič
2015-Dec-27 22:57 UTC
[syslinux] keytab-lilo: update to support kbd 2.0.3 format
On Sunday, December 27, 2015, 23:34:11, Ady via Syslinux wrote:> How this change would affect users with older versions of kbd / > loadkeys / or in older OSes? I mean, let's assume a user using a newer > version of Syslinux (containing this proposed change in its keytab-lilo > perl script) but with an older OS / older version of kbd / loadkeys / > map files.The changed regular expression will work for both formats from what I can see. -- < Jernej Simon?i? ><><><><>< http://eternallybored.org/ > If it should exist, it doesn't. -- Arnold's First Law of Documentation