[PATCH kdrive/ephyr v7 3/9] kdrive: introduce input hot-plugging support for udev and hal backends (#33140)

Adam Jackson ajax at nwnk.net
Mon Feb 8 19:45:43 UTC 2016


On Fri, 2015-12-11 at 11:43 -0200, Laércio de Sousa wrote:

> +void
> +systemd_logind_release_fd(int _major, int _minor, int fd)
> +{
> +}
> +
> +void
> +systemd_logind_vtenter(void)
> +{
> +}

This introduces a warning:

kdrive.c:1217:1: warning: no previous prototype for 'systemd_logind_release_fd' [-Wmissing-prototypes]
 systemd_logind_release_fd(int _major, int _minor, int fd)
 ^
kdrive.c:1222:1: warning: no previous prototype for 'systemd_logind_vtenter' [-Wmissing-prototypes]
 systemd_logind_vtenter(void)
 ^
 
> @@ -2230,5 +2348,55 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs,
>  void
>  DeleteInputDeviceRequest(DeviceIntPtr pDev)
>  {
> +#if defined(CONFIG_UDEV) || defined(CONFIG_HAL)
> +    OsBlockSIGIO();
>      RemoveDevice(pDev, TRUE);
> +
> +    /*
> +     * Search for fds that were not unregistered correctly
> +     * by RemoveDevice() call and unregister them.
> +     * Code taken from KdInputDisable() implementation.
> +     */

This seems like the sort of comment where the act of writing it is a
sign that the code must be wrong.  Why is RemoveDevice not closing the
fd for you?

- ajax


More information about the xorg-devel mailing list