Skip to contentSkip to conversation

2.5.25 correct inconsistent keyboard maps

PATCH In review Keith Owens 2 participants 2 messages Jul 6, 2002 – Jul 21, 2002 Turbochannel

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.25 correct inconsistent keyboard maps

The Makefiles that generate keyboard maps and the shipped files which are used when loadkeys is not installed are inconsistent. Some Makefiles remove static, others do not. Some shipped files have static removed, others do not. Make them consistent.

Index: 25.1/drivers/tc/Makefile

drivers/tc/Makefile Sat, 06 Jul 2002 14:35:08 +1000 kaos (linux-2.5/o/b/47_Makefile 1.4 444) renamed from drivers/tc/Makefile Sat, 06 Jul 2002 13:37:55 +1000 kaos (linux-2.5/o/b/47_Makefile 1.4 444) +3 -1
@@ -25,6 +25,8 @@ $(obj)/lk201-map.o: $(obj)/lk201-map.c
 ifdef GENERATE_KEYMAP
 
 $(obj)/lk201-map.c: $(obj)/%.c: $(src)/%.map
-	loadkeys --mktable $< > $@
+	loadkeys --mktable $< > [email protected]
+	sed -e 's/^static *//' [email protected] > $@
+	rm [email protected]
 
 endif

Index: 25.1/drivers/acorn/char/Makefile

drivers/acorn/char/Makefile Sat, 06 Jul 2002 14:36:15 +1000 kaos (linux-2.5/s/b/17_Makefile 1.4 444) renamed from drivers/acorn/char/Makefile Sat, 06 Jul 2002 13:37:55 +1000 kaos (linux-2.5/s/b/17_Makefile 1.4 444) +3 -1
@@ -30,6 +30,8 @@ $(obj)/defkeymap-acorn.o: $(obj)/defkeym
 ifdef GENERATE_KEYMAP
 
 $(obj)/defkeymap-acorn.c: $(obj)/%.c: $(src)/%.map
-	loadkeys --mktable $< > $@
+	loadkeys --mktable $< > [email protected]
+	sed -e 's/^static *//' [email protected] > $@
+	rm [email protected]
 
 endif

Index: 25.1/drivers/tc/lk201-map.c_shipped

drivers/tc/lk201-map.c_shipped Sat, 06 Jul 2002 14:30:43 +1000 kaos (linux-2.5/d/f/24_lk201-map. 1.1 644) renamed from drivers/tc/lk201-map.c_shipped Sat, 06 Jul 2002 13:37:55 +1000 kaos (linux-2.5/d/f/24_lk201-map. 1.1 644) +6 -6
@@ -25,7 +25,7 @@ u_short plain_map[NR_KEYS] = {
 	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-static u_short shift_map[NR_KEYS] = {
+u_short shift_map[NR_KEYS] = {
 	0xf200,	0xf100,	0xf101,	0xf102,	0xf103,	0xf104,	0xf105,	0xf106,
 	0xf107,	0xf108,	0xf109,	0xf10a,	0xf10b,	0xf10c,	0xf10d,	0xf203,
 	0xf11c,	0xf110,	0xf111,	0xf112,	0xf113,	0xf07e,	0xf021,	0xf040,
@@ -44,7 +44,7 @@ static u_short shift_map[NR_KEYS] = {
 	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-static u_short altgr_map[NR_KEYS] = {
+u_short altgr_map[NR_KEYS] = {
 	0xf200,	0xf100,	0xf101,	0xf102,	0xf103,	0xf104,	0xf105,	0xf106,
 	0xf107,	0xf108,	0xf109,	0xf10a,	0xf10b,	0xf10c,	0xf10d,	0xf202,
 	0xf11c,	0xf110,	0xf111,	0xf112,	0xf113,	0xf200,	0xf200,	0xf040,
@@ -63,7 +63,7 @@ static u_short altgr_map[NR_KEYS] = {
 	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-static u_short ctrl_map[NR_KEYS] = {
+u_short ctrl_map[NR_KEYS] = {
 	0xf200,	0xf100,	0xf101,	0xf102,	0xf103,	0xf104,	0xf105,	0xf106,
 	0xf107,	0xf108,	0xf109,	0xf10a,	0xf10b,	0xf10c,	0xf10d,	0xf204,
 	0xf11c,	0xf110,	0xf111,	0xf112,	0xf113,	0xf81b,	0xf200,	0xf000,
@@ -82,7 +82,7 @@ static u_short ctrl_map[NR_KEYS] = {
 	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-static u_short shift_ctrl_map[NR_KEYS] = {
+u_short shift_ctrl_map[NR_KEYS] = {
 	0xf200,	0xf100,	0xf101,	0xf102,	0xf103,	0xf104,	0xf105,	0xf106,
 	0xf107,	0xf108,	0xf109,	0xf10a,	0xf10b,	0xf10c,	0xf10d,	0xf200,
 	0xf11c,	0xf110,	0xf111,	0xf112,	0xf113,	0xf200,	0xf200,	0xf000,
@@ -101,7 +101,7 @@ static u_short shift_ctrl_map[NR_KEYS] =
 	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-static u_short alt_map[NR_KEYS] = {
+u_short alt_map[NR_KEYS] = {
 	0xf200,	0xf500,	0xf501,	0xf502,	0xf503,	0xf504,	0xf505,	0xf506,
 	0xf507,	0xf508,	0xf509,	0xf50a,	0xf50b,	0xf50c,	0xf50d,	0xf200,
 	0xf11c,	0xf510,	0xf511,	0xf512,	0xf513,	0xf01b,	0xf831,	0xf832,
@@ -120,7 +120,7 @@ static u_short alt_map[NR_KEYS] = {
 	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,	0xf200,
 };
 
-static u_short ctrl_alt_map[NR_KEYS] = {
+u_short ctrl_alt_map[NR_KEYS] = {
 	0xf200,	0xf500,	0xf501,	0xf502,	0xf503,	0xf504,	0xf505,	0xf506,
 	0xf507,	0xf508,	0xf509,	0xf50a,	0xf50b,	0xf50c,	0xf50d,	0xf200,
 	0xf11c,	0xf510,	0xf511,	0xf512,	0xf513,	0xf200,	0xf200,	0xf200,
#1 lore raw
Quoted 4 lines · Keith Owens

The Makefiles that generate keyboard maps and the shipped files which are used when loadkeys is not installed are inconsistent. Some Makefiles remove static, others do not. Some shipped files have static removed, others do not. Make them consistent.

Did you check that this cannot cause multiply defined symbols depending on arch/.config? (I did not, I don't even know why these cannot be static everywhere, but since I guess you did look at this when you did the change, I thought I may be able to save that effort)

--Kai