Commit d694b442 authored by Phil Blundell's avatar Phil Blundell

Avoid ugly shell error when libXdmcp isn't present.

New functions. (TsInit): Register them.
parent 3e18c636
......@@ -131,6 +131,20 @@ char *TsNames[] = {
int TsInputType;
static int
TsEnable (int fd, void *closure)
{
KdMouseInfo *mi = (KdMouseInfo *)closure;
return open (mi->name, 0);
}
static void
TsDisable (int fd, void *closure)
{
close (fd);
}
static int
TsInit (void)
{
......@@ -172,7 +186,12 @@ TsInit (void)
mi->driver = (void *) fd;
mi->inputType = TsInputType;
if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi))
{
/* Set callbacks for vt switches etc */
KdRegisterFdEnableDisable (fd, TsEnable, TsDisable);
n++;
}
}
else
close (fd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment