[syslinux:wip.makefixes] core/bios: remove unused keyword hash

syslinux-bot for H. Peter Anvin hpa at zytor.com
Thu Feb 28 16:36:06 PST 2019


Commit-ID:  56c69d73a56ee35a1d26d1ac7ccf73dedbe5f354
Gitweb:     https://www.syslinux.org/commit/56c69d73a56ee35a1d26d1ac7ccf73dedbe5f354
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 28 Feb 2019 16:34:34 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 28 Feb 2019 16:34:34 -0800

core/bios: remove unused keyword hash

... a remnant from when the config file was parsed in assembly.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>

---
 core/Makefile          |   7 +---
 core/bios/keywords.inc | 102 -------------------------------------------------
 core/genhash.pl        |  26 -------------
 core/keywords          |  51 -------------------------
 4 files changed, 2 insertions(+), 184 deletions(-)

diff --git a/core/Makefile b/core/Makefile
index e1a34da9..6b79d877 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -28,7 +28,7 @@ INCLUDE  += -I$(SRC)/include -I$(com32)/lib \
 CODEPAGE = cp865
 
 # The targets to build in this directory...
-BTARGET  = kwdhash.gen ldlinux.bss ldlinux.sys \
+BTARGET  = ldlinux.bss ldlinux.sys \
 	   isolinux.bin isolinux-debug.bin pxelinux.0 lpxelinux.0
 
 # The corresponding ELF files
@@ -43,7 +43,7 @@ NASMHDR	 := $(sort $(shell find $(SRC) -name '*.inc' -print))
 CSRC	 := $(sort $(shell find $(SRC) -name '*.c' -print))
 SSRC	 := $(sort $(shell find $(SRC) -name '*.S' -print))
 CHDR	 := $(sort $(shell find $(SRC) -name '*.h' -print))
-OTHERSRC := keywords
+OTHERSRC :=
 ALLSRC    = $(NASMSRC) $(NASMHDR) $(CSRC) $(SSRC) $(CHDR) $(OTHERSRC)
 
 COBJ	 := $(subst $(SRC)/,,$(patsubst %.c,%.o,$(CSRC)))
@@ -111,9 +111,6 @@ endif
 makeoutputdirs:
 	@mkdir -p $(sort $(dir $(COBJ) $(SOBJ)))
 
-kwdhash.gen: keywords genhash.pl
-	$(PERL) $(SRC)/genhash.pl < $(SRC)/keywords > $(OBJ)/kwdhash.gen
-
 ifeq ($(FWCLASS),BIOS)
 
 %.raw: %.elf
diff --git a/core/bios/keywords.inc b/core/bios/keywords.inc
deleted file mode 100644
index d91ca4ff..00000000
--- a/core/bios/keywords.inc
+++ /dev/null
@@ -1,102 +0,0 @@
-;; -----------------------------------------------------------------------
-;;
-;;   Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
-;;
-;;   This program is free software; you can redistribute it and/or modify
-;;   it under the terms of the GNU General Public License as published by
-;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
-;;   Boston MA 02111-1307, USA; either version 2 of the License, or
-;;   (at your option) any later version; incorporated herein by reference.
-;;
-;; -----------------------------------------------------------------------
-
-;;
-;; keywords.inc
-;;
-;; Common header file for the handling of keyword hash and macros
-;;
-
-%ifndef DEPEND		; Generated file
-%include "kwdhash.gen"
-%endif
-
-%macro keyword 2
-	dd hash_%1	; Hash value
-	dw 0		; No argument
-	dw %2		; Entrypoint
-%endmacro
-
-%macro keyword 3
-	dd hash_%1	; Hash value
-	dw %3		; 16-bit argument
-	dw %2		; Entrypoint
-%endmacro
-
-%macro keyword 4
-	dd hash_%1	; Hash value
-	db %3, %4	; 2 8-bit arguments
-	dw %2		; Entrypoint
-%endmacro
-
-keywd_size	equ 8	; Bytes per keyword
-
-		alignz 4
-
-%define FKeyN(n) (FKeyName+(((n)-1) << FILENAME_MAX_LG2))
-
-keywd_table:
-		keyword menu,		pc_comment
-		keyword text,		pc_text
-		keyword include,	pc_opencmd,	pc_include
-		keyword append,		pc_append
-		keyword initrd,		pc_filename,	InitRD
-		keyword default,	pc_default,	1
-		keyword ui,		pc_default,	2
-		keyword display,	pc_opencmd,	get_msg_file
-		keyword font,		pc_opencmd,	loadfont
-		keyword implicit,	pc_setint16,	AllowImplicit
-		keyword kbdmap,		pc_opencmd,	loadkeys
-		keyword kernel,		pc_kernel,	VK_KERNEL
-		keyword linux,		pc_kernel,	VK_LINUX
-		keyword boot,		pc_kernel,	VK_BOOT
-		keyword bss,		pc_kernel,	VK_BSS
-		keyword pxe,		pc_kernel,	VK_PXE
-		keyword fdimage,	pc_kernel,	VK_FDIMAGE
-		keyword comboot,	pc_kernel,	VK_COMBOOT
-		keyword com32,		pc_kernel,	VK_COM32
-		keyword config,		pc_kernel,	VK_CONFIG
-		keyword label,		pc_label
-		keyword prompt,		pc_setint16,	ForcePrompt
-		keyword say,		pc_say
-		keyword serial,		pc_serial
-		keyword console,	pc_setint16,	DisplayCon
-		keyword timeout,	pc_timeout,	KbdTimeout
-		keyword totaltimeout,	pc_timeout,	TotalTimeout
-		keyword ontimeout,	pc_ontimeout
-		keyword onerror,	pc_onerror
-		keyword allowoptions,	pc_setint16,	AllowOptions
-		keyword noescape,	pc_setint16,	NoEscape
-		keyword nocomplete,	pc_setint16,	NoComplete
-		keyword nohalt,		pc_setint16,	NoHalt
-		keyword pxeretry,	pc_setint16,	PXERetry
-		keyword f1,		pc_filename,	FKeyN(1)
-		keyword f2,		pc_filename,	FKeyN(2)
-		keyword f3,		pc_filename,	FKeyN(3)
-		keyword f4,		pc_filename,	FKeyN(4)
-		keyword f5,		pc_filename,	FKeyN(5)
-		keyword f6,		pc_filename,	FKeyN(6)
-		keyword f7,		pc_filename,	FKeyN(7)
-		keyword f8,		pc_filename,	FKeyN(8)
-		keyword f9,		pc_filename,	FKeyN(9)
-		keyword f10,		pc_filename,	FKeyN(10)
-		keyword f0,		pc_filename,	FKeyN(10)
-		keyword f11,		pc_filename,	FKeyN(11)
-		keyword f12,		pc_filename,	FKeyN(12)
-		keyword ipappend,	pc_sysappend
-		keyword sysappend,	pc_sysappend
-		keyword localboot,	pc_localboot
-%if IS_PXELINUX
-		keyword sendcookies,	pc_sendcookies
-%endif
-
-keywd_count	equ ($-keywd_table)/keywd_size
diff --git a/core/genhash.pl b/core/genhash.pl
deleted file mode 100755
index c79139fd..00000000
--- a/core/genhash.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/perl
-#
-# Generate hash values for keywords
-#
-
-eval { use bytes; };
-
-while ( defined($keywd = <STDIN>) ) {
-    chomp $keywd;
-
-    ($keywd,$keywdname) = split(/\s+/, $keywd);
-    $keywdname = $keywd unless ( $keywdname );
-
-    $l = length($keywd);
-    $h = 0;
-    for ( $i = 0 ; $i < $l ; $i++ ) {
-	$c = ord(substr($keywd,$i,1)) | 0x20;
-	$h = ((($h << 5)|($h >> 27)) ^ $c) & 0xFFFFFFFF;
-    }
-    if ( $seenhash{$h} ) {
-	printf STDERR "$0: hash collision (0x%08x) %s %s\n",
-	$h, $keywd, $seenhash{$h};
-    }
-    $seenhash{$h} = $keywd;
-    printf("%-23s equ 0x%08x\n", "hash_${keywdname}", $h);
-}
diff --git a/core/keywords b/core/keywords
deleted file mode 100644
index 8af0095f..00000000
--- a/core/keywords
+++ /dev/null
@@ -1,51 +0,0 @@
-menu
-text
-include
-append
-initrd
-config
-default
-ui
-display
-font
-implicit
-ipappend
-kbdmap
-kernel
-linux
-boot
-bss
-pxe
-pxeretry
-fdimage
-comboot
-com32
-label
-localboot
-prompt
-say
-serial
-console
-timeout
-totaltimeout
-allowoptions
-ontimeout
-onerror
-noescape
-nocomplete
-nohalt
-sysappend
-sendcookies
-f0
-f1
-f2
-f3
-f4
-f5
-f6
-f7
-f8
-f9
-f10
-f11
-f12


More information about the Syslinux-commits mailing list