Re: Config-option for PS/2 mouse detection at boot time [patch]

Richard Gooch (rgooch@atnf.csiro.au)
Wed, 9 Dec 1998 11:39:06 +1100


Sven Koch writes:
> hi...
>
> I maintain about 200 machines spread throughout germany, and need one
> software-setup for all. As they only use ps2- or ms-mice, I used to check
> for "I can load module psaux, so there is a ps2-mouse, otherwise use
> ms-type on ttyS0", but with the new scheme I found no other way but
> patching the kernel.
>
> With the new psaux-driver merged into the kernel, I'm no longer able to
> check if there is a ps2-mouse connected to the machine, as the
> psaux-driver is loaded (and initalized) every time when I compile it in.
>
> With the following little patch (really easy, as all the code was still
> there), you get a new config option to reenable the old behavior of
> supporting the ps2-mouse only if it was found at boot time. This way I can
> check /proc/misc for "psaux", and if it's there, the mouse was found.
>
> Please correct me if this patch is bad and there is a better way to really
> detect the presence of a ps2-mouse from userland.

I think what would be better would be to not patch to kernel to not
call misc_register() when the PS/2 mouse is not detected. I note in my
boot logs that the PS/2 mouse was not detected (fair enough: I don't
have one), but I still see it in /proc/misc. That should be fixed.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/