Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP1:GA
kbd.432
kbd-1.15.2-dumpkeys-ppc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kbd-1.15.2-dumpkeys-ppc.patch of Package kbd.432
XXX: this has been reverted upstream with the comment: Revert "[SYSTEM] Apply patch from SUSE." This is an old mistake. No, 0 is not a valid keycode. It is used by the kernel for bookkeeping purposes. It must not be used as keycode. Andries This reverts commit 49ce531d1c70017113540318b24b9d645d170773. Signed-off-by: Andries Brouwer <Andries.Brouwer@cwi.nl> Signed-off-by: Alexey Gladkov <legion@altlinux.org> --- src/dumpkeys.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) Index: kbd-1.15.2/src/dumpkeys.c =================================================================== --- kbd-1.15.2.orig/src/dumpkeys.c +++ kbd-1.15.2/src/dumpkeys.c @@ -165,6 +165,10 @@ valid_type(int t) { ke.kb_index = 0; ke.kb_table = 0; ke.kb_value = K(t, 0); +#if defined(__mc68000__) || defined(__powerpc__) + /* Keycode 0 is a valid keycode, do not clobber it. */ + ioctl(fd, KDGKBENT, (unsigned long)&ke); +#endif status = (ioctl(fd, KDSKBENT, (unsigned long)&ke) == 0); return status; } @@ -269,8 +273,13 @@ static void show_short_info(void) { int i; +#if !defined(__mc68000__) && !defined(__powerpc__) printf(_("keycode range supported by kernel: 1 - %d\n"), nr_keys - 1); +#else + printf(_("keycode range supported by kernel: 0 - %d\n"), + NR_KEYS - 1); +#endif printf(_("max number of actions bindable to a key: %d\n"), MAX_NR_KEYMAPS); get_keymaps(); @@ -383,7 +392,11 @@ dump_keys(char table_shape, char numeric for (j = 0; j < MAX_NR_KEYMAPS; j++) { int ja = (j | M_ALT); if (j != ja && keymap_index[j] >= 0 && keymap_index[ja] >= 0) +#if !defined(__mc68000__) && !defined(__powerpc__) for (i = 1; i < nr_keys; i++) { +#else + for (i = 0; i < nr_keys; i++) { +#endif int buf0, buf1, type; buf0 = get_bind(i, j); @@ -411,7 +424,11 @@ dump_keys(char table_shape, char numeric not_alt_is_meta: no_shorthands: +#if !defined(__mc68000__) && !defined(__powerpc__) for (i = 1; i < nr_keys; i++) { +#else + for (i = 0; i < nr_keys; i++) { +#endif for (j = 0; j < keymapnr; j++) buf[j] = get_bind(i, good_keymap[j]); if (buf[0] == -1)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor