Bug#470882: /dev/gpmctl freezes acknowledge

Kurt Roeckx kurt at roeckx.be
Sat Oct 25 19:13:29 UTC 2008


On Sat, Oct 25, 2008 at 08:47:08PM +0200, Christoph Berg wrote:
> 
> I suspect the following code from old_main() is bogus:
> 
>      /* 
>       * Be sure to be in text mode. This used to be before select,
>       * but actually it only matters if you have events.
>       */
>       {
>       int fd = open_console(O_RDONLY);
>       if (ioctl(fd, KDGETMODE, &kd_mode) < 0)
>          gpm_report(GPM_PR_OOPS,GPM_MESS_IOCTL_KDGETMODE);
>       close(fd);
>       if(kd_mode != KD_TEXT && !option.repeater && !option.force_repeat) {
>          wait_text(&mouse_table[1].fd);
> 
> What does it mean to be "in text mode"? What if X is started later?

It return 0 (KD_TEXT) when the _current_ console is a text console
and 1 (KD_GRAPHICS) when you're in X.  It has nothing to do with
what console gpm runs on, since it's detached.



Kurt






More information about the pkg-gpm-devel mailing list