Avoid ugly shell error when libXdmcp isn't present.
New functions. (TsInit): Register them.
This commit is contained in:
parent
3e18c63634
commit
d694b44259
|
@ -131,6 +131,20 @@ char *TsNames[] = {
|
||||||
|
|
||||||
int TsInputType;
|
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
|
static int
|
||||||
TsInit (void)
|
TsInit (void)
|
||||||
{
|
{
|
||||||
|
@ -172,8 +186,13 @@ TsInit (void)
|
||||||
mi->driver = (void *) fd;
|
mi->driver = (void *) fd;
|
||||||
mi->inputType = TsInputType;
|
mi->inputType = TsInputType;
|
||||||
if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi))
|
if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi))
|
||||||
|
{
|
||||||
|
/* Set callbacks for vt switches etc */
|
||||||
|
KdRegisterFdEnableDisable (fd, TsEnable, TsDisable);
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
close (fd);
|
close (fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user