On Mon, Feb 07, 2011 at 11:28:49PM +0100, Simon Thum wrote:
> This allows set_percent_option() in synaptics to work as described, i.e.
> without an irritating warning.
> 
> Signed-off-by: Simon Thum <[email protected]>
> ---
> Possibly, the other cases should be aligned as well?

yes, that makes sense. Please fix the others up as well.

Cheers,
  Peter

> 
>  hw/xfree86/common/xf86Option.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
> index 455cafa..9ab183b 100644
> --- a/hw/xfree86/common/xf86Option.c
> +++ b/hw/xfree86/common/xf86Option.c
> @@ -561,8 +561,10 @@ ParseOptionValue(int scrnIndex, pointer options,
> OptionInfoPtr p,
>                * hence 100 looks the same as 100% to the caller of sccanf
>                */
>               if (sscanf(s, "%lf%c", &p->value.realnum, &tmp) != 2 || tmp != 
> '%') {
> -                 xf86DrvMsg(scrnIndex, X_WARNING,
> +                 if (markUsed) {
> +                     xf86DrvMsg(scrnIndex, X_WARNING,
>                              "Option \"%s\" requires a percent value\n", 
> p->name);
> +                 }
>                   p->found = FALSE;
>               } else {
>                   p->found = TRUE;
> -- 
> 1.7.3.4
> 
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to