diff options
| author | yx209491 <none@none> | 2007-06-04 19:21:29 -0700 |
|---|---|---|
| committer | yx209491 <none@none> | 2007-06-04 19:21:29 -0700 |
| commit | 4470e6878e514c52138797efb506203d656b695f (patch) | |
| tree | 1fdca227f1520a6272637a4fb0fe9045c87491c8 | |
| parent | 95907d70520eca3932fa1e426bef4841a119a3b9 (diff) | |
| download | illumos-joyent-4470e6878e514c52138797efb506203d656b695f.tar.gz | |
6455305 There should be no limitation on keyboard repeat rate
| -rw-r--r-- | usr/src/cmd/kbd/kbd.c | 18 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/kbio.h | 2 |
2 files changed, 6 insertions, 14 deletions
diff --git a/usr/src/cmd/kbd/kbd.c b/usr/src/cmd/kbd/kbd.c index 10a7582126..e57558e261 100644 --- a/usr/src/cmd/kbd/kbd.c +++ b/usr/src/cmd/kbd/kbd.c @@ -79,7 +79,6 @@ #define MAX_LINE_SIZE 256 #define DEFAULT_KBD_LAYOUT 33 -int errno; char *layout_names[MAX_LAYOUT_NUM]; int layout_numbers[MAX_LAYOUT_NUM]; static int layout_count; @@ -568,7 +567,7 @@ set_repeat_delay(char *delay_str, int kbd) * The error message depends on the different inputs. * a. the input is a invalid integer(unit in ms) * b. the input is a integer less than the minimal delay setting. - * The condition (a) has been covered by main function and set_default + * The condition (a) has been covered by main function and kbd_defaults * function. */ if (ioctl(kbd, KIOCSRPTDELAY, &delay) == -1) { @@ -592,21 +591,14 @@ set_repeat_rate(char *rate_str, int kbd) int rate = atoi(rate_str); /* - * The error message depends on the different inputs. - * a. the input is a invalid integer(unit in ms) - * b. the input is a integer less than the minimal rate setting. - * The condition (a) has been covered by main function and set_default - * function. + * The input validation check has been covered by main function + * and kbd_defaults function.Here just give an error message if + * the ioctl fails. */ if (ioctl(kbd, KIOCSRPTRATE, &rate) == -1) { - if (rate < KIOCRPTRATE_MIN) - (void) fprintf(stderr, "kbd: specified rate %d is " - "less than minimum %d\n", rate, KIOCRPTRATE_MIN); - else - perror("kbd: set repeat rate"); + perror("kbd: set repeat rate"); return (1); } - return (0); } diff --git a/usr/src/uts/common/sys/kbio.h b/usr/src/uts/common/sys/kbio.h index 8bc9b761f0..2f77eb47e0 100644 --- a/usr/src/uts/common/sys/kbio.h +++ b/usr/src/uts/common/sys/kbio.h @@ -226,7 +226,7 @@ struct freq_request { /* Used to control the AutoRepeat Min-delay and Min-Rate */ #define KIOCRPTDELAY_MIN (100) -#define KIOCRPTRATE_MIN (30) +#define KIOCRPTRATE_MIN (1) #ifdef __cplusplus } |
