[PATCH] xfree86: don't warn about nonexisting core pointer/keyboard in config.

Fernando Carrijo fcarrijo at yahoo.com.br
Mon Mar 8 17:53:18 PST 2010


Peter Hutterer <peter.hutterer at who-t.net> wrote:
> In the vast majority of cases there is no xorg.conf that specifies a core
> pointer/keyboard. Skip this warning, since we'll get another notification
> about how the server relies on the config backend for input devices anyway.
> 
> Leave the warning in for the error case (AEI off).
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  hw/xfree86/common/xf86Config.c |   24 ++++++++----------------
>  1 files changed, 8 insertions(+), 16 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
> index 6fbf613..6987bcc 100644
> --- a/hw/xfree86/common/xf86Config.c
> +++ b/hw/xfree86/common/xf86Config.c
> @@ -1269,14 +1269,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
>  	}
>      }
>  
> -    if (!foundPointer) {
> -	if (!xf86Info.allowEmptyInput) {
> -	    /* This shouldn't happen. */
> -	    xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
> -	    return FALSE;
> -	} else {
> -	    xf86Msg(X_INFO, "Cannot locate a core pointer device.\n");
> -	}
> +    if (!foundPointer && !xf86Info.allowEmptyInput) {
> +	/* This shouldn't happen. */
> +	xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
> +	return FALSE;
>      }
>  
>      /*
> @@ -1413,14 +1409,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
>  	}
>      }
>  
> -    if (!foundKeyboard) {
> -	if (!xf86Info.allowEmptyInput) {
> -		/* This shouldn't happen. */
> -		xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
> -		return FALSE;
> -	} else {
> -		xf86Msg(X_INFO, "Cannot locate a core keyboard device.\n");
> -	}
> +    if (!foundKeyboard && !xf86Info.allowEmptyInput) {
> +	/* This shouldn't happen. */
> +	xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
> +	return FALSE;
>      }
>  
>      if (pointerMsg) {
> -- 
> 1.6.6.1

Reviewed-by: Fernando Carrijo <fcarrijo at yahoo.com.br>



More information about the xorg-devel mailing list