source: patches/kbd-1.15-sparc_kbio-1.patch@ 791132be

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 791132be was a65d7f3, checked in by Jim Gifford <clfs@…>, 16 years ago

Added patch to sparc to fix kbd build

  • Property mode set to 100644
File size: 2.7 KB
  • man/man8/kbdrate.8

    Submitted By: Jim Gifford (jim at cross-lfs dot org)
    Date: 2009-02-05
    Initial Package Version: 1.15
    Origin: Fedora
    Upstream Status: Unknown
    Description: Sparc Linux Headers doesn't have asm/kbio.h anymore
    
    diff -Naur kbd-1.15.orig/man/man8/kbdrate.8 kbd-1.15/man/man8/kbdrate.8
    old new  
    2222without any options will reset the repeat rate to 10.9 characters per second (cps)
    2323and the delay to 250 milliseconds (ms) for Intel- and M68K-based systems.
    2424These are the IBM defaults. On SPARC-based systems it will reset the repeat rate
    25 to 5 cps and the delay to 200 ms.
     25to 20 cps and the delay to 200 ms.
    2626
    2727.SH OPTIONS
    2828.TP
     
    6969.I /etc/rc.local
    7070.br
    7171.I /dev/port
     72.br
     73.I /dev/kbd
  • src/kbdrate.c

    diff -Naur kbd-1.15.orig/src/kbdrate.c kbd-1.15/src/kbdrate.c
    old new  
    7777
    7878#ifdef __sparc__
    7979#include <asm/param.h>
    80 #include <asm/kbio.h>
    8180#endif
    8281
    8382#ifndef KDKBDREP
     
    109108
    110109static int
    111110KDKBDREP_ioctl_ok(double rate, int delay, int silent) {
     111#if defined(KDKBDREP) && !defined(__sparc__)
    112112        /*
    113113         * This ioctl is defined in <linux/kd.h> but is not
    114114         * implemented anywhere - must be in some m68k patches.
     115         * We cannot blindly try unimplemented ioctls on sparc64 -
     116         * the 32<->64bit transition layer does not like it.
    115117         * Since 2.4.9 also on i386.
    116          */
     118         */
     119
    117120        struct my_kbd_repeat kbdrep_s;
    118121
    119122        /* don't change, just test */
     
    177180                        rate, kbdrep_s.delay );
    178181
    179182        return 1;                       /* success! */
     183#else /* no KDKBDREP or __sparc__ */
     184        return 0;
     185#endif /* KDKBDREP */
    180186}
    181187
    182188static int
     
    221227int
    222228main( int argc, char **argv ) {
    223229#ifdef __sparc__
    224         double      rate = 5.0;      /* Default rate */
     230        double      rate = 20.0;      /* Default rate */
    225231        int         delay = 200;     /* Default delay */
    226232#else
    227233        double      rate = 10.9;     /* Default rate */
     
    272278
    273279
    274280        /* The ioport way */
     281        /* The ioport way - will crash on sparc */
    275282
     283#ifndef __sparc__
    276284        for (i = 0; i < RATE_COUNT; i++)
    277285                if (rate * 10 >= valid_rates[i]) {
    278286                        value &= 0x60;
     
    335343                        valid_rates[value & 0x1f] / 10.0,
    336344                        valid_delays[ (value & 0x60) >> 5 ] );
    337345
     346#endif
     347
    338348        return 0;
    339349}
  • src/setleds.c

    diff -Naur kbd-1.15.orig/src/setleds.c kbd-1.15/src/setleds.c
    old new  
    1414#include "nls.h"
    1515#include "version.h"
    1616
    17 #ifdef __sparc__
    18 #include <asm/kbio.h>
    19 #endif
    20 
    2117static void
    2218usage(void)
    2319{
Note: See TracBrowser for help on using the repository browser.