<div dir="ltr">2016-02-11 0:56 GMT-02:00 Peter Hutterer <span dir="ltr"><<a href="mailto:peter.hutterer@who-t.net" target="_blank">peter.hutterer@who-t.net</a>></span>:<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">we don't have a 1:1 mapping between devices and fd (e.g. wacom devices all<br>
hang off a single fd). Even the fd itself is a DDX concept, so RemoveDevice<br>
cannot close the fd.<br>
<br>
What should happen here though is that the pDev->public.devicePrivate points<br>
to something kdrive understands and that includes the fd.<br></blockquote><div>Reading kdrive evdev sources, I've found that EvdevPtrDisable/EvdevKbdDisable functions</div><div>do have a KdUnregisterFd() call. Example:</div><div><br></div><div><div>static void</div><div>EvdevPtrDisable(KdPointerInfo * pi)</div><div>{</div><div> Kevdev *ke;</div><div><br></div><div> ke = pi->driverPrivate;</div><div><br></div><div> if (!pi || !pi->driverPrivate)</div><div> return;</div><div><br></div><div> KdUnregisterFd(pi, ke->fd, TRUE);</div><div><br></div><div> if (ioctl(ke->fd, EVIOCGRAB, 0) < 0)</div><div> perror("Ungrabbing evdev mouse device failed");</div><div><br></div><div> free(ke);</div><div> pi->driverPrivate = 0;</div><div>}</div></div><div><br></div><div>However, it seems to fail in my system, because I always get that "Ungrabbing evdev mouse device failed" error message.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Laércio de Sousa</b><br></div><div style="text-align:center"><div style="text-align:left"><i>Orientador de Informática</i></div><div style="text-align:left"><u>Escola Municipal "Professor Eulálio Gruppi"</u></div><div style="text-align:left"><i>Rua Ismael da Silva Mello, 559, Mogi Moderno</i></div><i><div style="text-align:left"><i>Mogi das Cruzes - SP</i></div><div style="text-align:left"><i>CEP 08717-390</i></div></i></div><div><span style="font-family:arial;font-size:small">Telefone: (11) 4726-8313</span></div></div></div>
</div></div>