aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-09 22:53:35 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-09 22:53:35 -0800
commite563276370ebbff8d82f6c1a1050b2d02e491af7 (patch)
tree16599c08444d3aa70220ff3775971dcdf2cd638a /utils
parent2b02abdaa91f41235f40f846d08bb09d8841baa6 (diff)
downloadsyslinux.git-e563276370ebbff8d82f6c1a1050b2d02e491af7.tar.gz
syslinux.git-e563276370ebbff8d82f6c1a1050b2d02e491af7.tar.xz
syslinux.git-e563276370ebbff8d82f6c1a1050b2d02e491af7.zip
Update keytab-lilo from LILO 22.8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/keytab-lilo26
1 files changed, 5 insertions, 21 deletions
diff --git a/utils/keytab-lilo b/utils/keytab-lilo
index 7dbcf94b..fd58e004 100755
--- a/utils/keytab-lilo
+++ b/utils/keytab-lilo
@@ -1,23 +1,8 @@
#!/usr/bin/perl
-# --------------------------------------------------------------------------
-# This program was taken from the LILO-20 distribution; only this header
-# was added.
-#
-# LILO program code, documentation and auxiliary programs are
-# Copyright 1992-1997 Werner Almesberger.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms of parts of or the
-# whole original or derived work are permitted provided that the
-# original work is properly attributed to the author. The name of the
-# author may not be used to endorse or promote products derived from
-# this software without specific prior written permission. This work
-# is provided "as is" and without any express or implied warranties.
-# --------------------------------------------------------------------------
-eval { use bytes; }; eval { binmode STDOUT; };
+eval { use bytes; }
+eval { binmode STDOUT; }
-$DEFAULT_PATH = "/lib/kbd/keymaps";
$DEFAULT_MAP = "us";
$DEFAULT_EXT = ".map";
@@ -54,8 +39,7 @@ sub load_map
local ($empty,$current);
$map = $DEFAULT_MAP unless defined $map;
- # $map = $DEFAULT_PATH."/".$map unless $map =~ m|/|;
- # $map .= $DEFAULT_EXT unless $map =~ m|/[^/]+\.[^/]+$|;
+ $map .= $DEFAULT_EXT unless $map =~ m|/[^/]+\.[^/]+$|;
if (!open(FILE,"loadkeys -m $map |")) {
print STDERR "loadkeys -m $map: $!\n";
exit 1;
@@ -64,9 +48,9 @@ sub load_map
$empty = 1;
while (<FILE>) {
chop;
- if (/^u_short\s+(\S+)_map\[\S+\]\s+=\s+{\s*$/) {
+ if (/^(static\s+)?u_short\s+(\S+)_map\[\S*\]\s+=\s+{\s*$/) {
die "active at beginning of map" if defined $current;
- $current = $pfx.":".$1;
+ $current = $pfx.":".$2;
next;
}
undef $current if /^};\s*$/;