Skip to contentSkip to conversation

keymaps: drop support for include files

PATCH In review Gerd Hoffmann 2 participants 6 messages Nov 16, 2018 Kbuild

lore
Share & tools
lore
#0 lore raw

v2 cover keymaps: drop support for include files

Most keymaps are generated using qemu-keymap these days and do not use include files anyway.

v2: fix "make install" failure.

Gerd Hoffmann (4):
keymaps: remove modifiers include
keymaps: drop nl-be map
keymaps: remove common include
keymaps: drop support for include files

 Makefile                  |   4 +-
 ui/keymaps.c              |   7 +-
 pc-bios/keymaps/common    | 157 ----------------------------------------
 pc-bios/keymaps/modifiers |  18 -----
 pc-bios/keymaps/nl-be     |   3 -
 pc-bios/keymaps/sl        | 177 +++++++++++++++++++++++++++++++++++++++++++++-
 pc-bios/keymaps/sv        | 176 ++++++++++++++++++++++++++++++++++++++++++++-
 7 files changed, 356 insertions(+), 186 deletions(-)
 delete mode 100644 pc-bios/keymaps/common
 delete mode 100644 pc-bios/keymaps/modifiers
 delete mode 100644 pc-bios/keymaps/nl-be
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/4 keymaps: remove modifiers include

"common" is the only file using it, so we can just include it directly.

---
 Makefile                  |  2 +-
 pc-bios/keymaps/common    | 19 ++++++++++++++++++-
 pc-bios/keymaps/modifiers | 18 ------------------
 3 files changed, 19 insertions(+), 20 deletions(-)
 delete mode 100644 pc-bios/keymaps/modifiers
Makefile +1 -1
index f2947186a4..7899f9d621 100644
@@ -794,7 +794,7 @@ distclean: clean
 	rm -Rf .sdk
 	if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi
 
-KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
+KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
 common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr \
 bepo    cz
pc-bios/keymaps/common +18 -1
index adc56c77d2..aa844c82ed 100644
@@ -1,4 +1,21 @@
-include modifiers
+Shift_R 0x36
+Shift_L 0x2a
+
+Alt_R 0xb8
+Mode_switch 0xb8
+ISO_Level3_Shift 0xb8
+Alt_L 0x38
+
+Control_R 0x9d
+Control_L 0x1d
+
+# Translate Super to Windows keys.
+# This is hardcoded. See documentation for details.
+Super_R 0xdc
+Super_L 0xdb
+
+# Translate Menu to the Windows Application key.
+Menu 0xdd
 
 #
 # Top row
pc-bios/keymaps/modifiers deleted +0 -18
deleted file mode 100644
index d73b7a6637..0000000000
@@ -1,18 +0,0 @@
-Shift_R 0x36
-Shift_L 0x2a
-
-Alt_R 0xb8
-Mode_switch 0xb8
-ISO_Level3_Shift 0xb8
-Alt_L 0x38
-
-Control_R 0x9d
-Control_L 0x1d
-
-# Translate Super to Windows keys.
-# This is hardcoded. See documentation for details.
-Super_R 0xdc
-Super_L 0xdb
-
-# Translate Menu to the Windows Application key.
-Menu 0xdd
Signature · 1 line
2.9.3
#2 lore raw

PATCH v2 2/4 keymaps: drop nl-be map

In reply to Gerd Hoffmann

It doesn't define any keys, only includes "common". Which makes it effectively an "en-us" map.

---
 Makefile              | 2 +-
 pc-bios/keymaps/nl-be | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
 delete mode 100644 pc-bios/keymaps/nl-be
Makefile +1 -1
index 7899f9d621..d3355ec2c7 100644
@@ -796,7 +796,7 @@ distclean: clean
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
-common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr \
+common  de-ch  es     fo  fr-ca  hu     ja  mk  pt  sl     tr \
 bepo    cz
 
 ifdef INSTALL_BLOBS
pc-bios/keymaps/nl-be deleted +0 -3
deleted file mode 100644
index 34fc881ad0..0000000000
@@ -1,3 +0,0 @@
-# Dutch (Belgium)
-map 0x813
-include common
Signature · 1 line
2.9.3
#3 lore raw

PATCH v2 3/4 keymaps: remove common include

In reply to Gerd Hoffmann

Copy the content into the sl and sv files (the only ones left which are not generated by qemu-keymap).

---
 Makefile               |   2 +-
 pc-bios/keymaps/common | 174 ------------------------------------------------
 pc-bios/keymaps/sl     | 177 ++++++++++++++++++++++++++++++++++++++++++++++++-
 pc-bios/keymaps/sv     | 176 +++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 352 insertions(+), 177 deletions(-)
 delete mode 100644 pc-bios/keymaps/common
Makefile +1 -1
index d3355ec2c7..6e63ce8ec1 100644
@@ -796,7 +796,7 @@ distclean: clean
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
-common  de-ch  es     fo  fr-ca  hu     ja  mk  pt  sl     tr \
+de-ch  es     fo  fr-ca  hu     ja  mk  pt  sl     tr \
 bepo    cz
 
 ifdef INSTALL_BLOBS
pc-bios/keymaps/common deleted +0 -174

174 lines not on this page · raw message

pc-bios/keymaps/sl +176 -1

181 lines not on this page · raw message

pc-bios/keymaps/sv +175 -1

180 lines not on this page · raw message

Signature · 1 line
2.9.3
#4 lore raw

PATCH v2 4/4 keymaps: drop support for include files

In reply to Gerd Hoffmann
---
 ui/keymaps.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
ui/keymaps.c +3 -4
index 085889b555..6e44f738ed 100644
@@ -115,10 +115,9 @@ static int parse_keyboard_layout(kbd_layout_t *k,
             continue;
         }
         if (!strncmp(line, "include ", 8)) {
-            if (parse_keyboard_layout(k, table, line + 8, errp) < 0) {
-                ret = -1;
-                goto out;
-            }
+            error_setg(errp, "keymap include files are not supported any more");
+            ret = -1;
+            goto out;
         } else {
             int offset = 0;
             while (line[offset] != 0 &&
Signature · 1 line
2.9.3
Reviewed-by on v2 4/4
#5 lore raw
Quoted 2 lines · Gerd Hoffmann <[email protected]> 于2018年11月16日周五 下午6:43写道:
Quoted 27 lines
---
 ui/keymaps.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
ui/keymaps.c +3 -4
index 085889b555..6e44f738ed 100644
@@ -115,10 +115,9 @@ static int parse_keyboard_layout(kbd_layout_t *k,
             continue;
         }
         if (!strncmp(line, "include ", 8)) {
-            if (parse_keyboard_layout(k, table, line + 8, errp) < 0) {
-                ret = -1;
-                goto out;
-            }
+            error_setg(errp, "keymap include files are not supported any
 more");
+            ret = -1;
+            goto out;
         } else {
             int offset = 0;
             while (line[offset] != 0 &&

--
2.9.3