[PATCH libsensors] emit line number for each 'set' statement that fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark,

On Mon, 4 Dec 2006 22:41:32 -0500, Mark M. Hoffman wrote:
> You asked about this on IRC last Sunday, and unfortunately I gave you some bad
> information.  Turns out it is trivial after all.  I completely forgot about
> libsensors error.h.
> 
> Index: lib/access.c
> ===================================================================
> --- lib/access.c	(revision 4253)
> +++ lib/access.c	(working copy)
> @@ -460,6 +460,8 @@
>  				continue;
>  			}
>  			if ((res = sensors_set_feature(name, feature_nr, value))) {
> +				sensors_parse_error("Can't set feature.",
> +						chip->sets[i].lineno);
>  				err = res;
>  				continue;
>  			}

Very nice. It's sort of abusing the "sensors_parse_error" name as this
isn't a parse error, but I guess we don't really care. Care to apply
this change to our SVN tree?

Thanks,
-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux