Re: [PATCH v2 07/14] config: provide kvi with config files

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

 



"Glen Choo via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
> @@ -963,7 +965,8 @@ static int get_value(struct config_source *cs, config_fn_t fn, void *data,
>  	 * accurate line number in error messages.
>  	 */
>  	cs->linenr--;
> -	ret = fn(name->buf, value, NULL, data);
> +	kvi->linenr = cs->linenr;
> +	ret = fn(name->buf, value, kvi, data);

Forgot to mention in my other email...it's a pity that we have to bump
the kvi->linenr like this because the original kvi generated from the
cs is now out-to-date w.r.t. the cs in terms of line number (you can
see in the context how the cs linenr is also updated), so there are now
2 sources of truth with regards to the line number. I can't think of a
better way to do this, though.
 



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux