source: patches/kbd-1.12-sparc_kbdrate-1.patch@ a3b6c75

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since a3b6c75 was 69cde8d, checked in by Jim Gifford <clfs@…>, 19 years ago

Added: All patches needed for the book.

  • Property mode set to 100644
File size: 1.0 KB
  • src/kbdrate.c

    Submitted By: Jim Gifford (patches at jg555 dot com)
    Date: 2005-07-01
    Initial Package Version: 1.12
    Origin: Gentoo CVS
    Upstream Status: Unknown
    Description: Sparc have not yet fixed struct kbd_rate to use 'period' and not 'rate'
     
    diff -Naur kbd-1.12.orig/src/kbdrate.c kbd-1.12/src/kbdrate.c
    old new  
    164164                exit( 1 );
    165165        }
    166166
    167         kbdrate_s.period = (int) (rate + 0.5);  /* round up */
     167        kbdrate_s.rate = (int) (rate + 0.5);  /* round up */
    168168        kbdrate_s.delay = delay * HZ / 1000;  /* convert ms to Hz */
    169         if (kbdrate_s.period > 50)
    170                 kbdrate_s.period = 50;
     169        if (kbdrate_s.rate > 50)
     170                kbdrate_s.rate = 50;
    171171
    172172        if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
    173173                perror( "ioctl(KIOCSRATE)" );
     
    177177
    178178        if (!silent)
    179179                printf( "Typematic Rate set to %d cps (delay = %d ms)\n",
    180                         kbdrate_s.period, kbdrate_s.delay * 1000 / HZ );
     180                        kbdrate_s.rate, kbdrate_s.delay * 1000 / HZ );
    181181
    182182        return 1;
    183183#else /* no KIOCSRATE */
Note: See TracBrowser for help on using the repository browser.