<div dir="ltr">Done,<div>Thanks.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 4:44 PM, Sebastian Herbszt <span dir="ltr"><<a href="mailto:herbszt@gmx.de" target="_blank">herbszt@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Bart Van Assche wrote:<br>
> Make it easier to figure out which line contains a syntax error<br>
> by printing the line number and the offending line itself.<br>
><br>
> Signed-off-by: Bart Van Assche <<a href="mailto:bvanassche@acm.org">bvanassche@acm.org</a>><br>
> ---<br>
>  libmultipath/parser.c | 11 ++++++++---<br>
>  1 file changed, 8 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/libmultipath/parser.c b/libmultipath/parser.c<br>
> index b7bdfcc..d8673bc 100644<br>
> --- a/libmultipath/parser.c<br>
> +++ b/libmultipath/parser.c<br>
> @@ -460,7 +460,7 @@ int<br>
>  process_stream(vector keywords)<br>
>  {<br>
>       int i;<br>
> -     int r = 0;<br>
> +     int r = 0, t;<br>
>       struct keyword *keyword;<br>
>       char *str;<br>
>       char *buf;<br>
> @@ -501,8 +501,13 @@ process_stream(vector keywords)<br>
>                                               free_strvec(strvec);<br>
>                                               goto out;<br>
>                               }<br>
> -                             if (keyword->handler)<br>
> -                                     r += (*keyword->handler) (strvec);<br>
> +                             if (keyword->handler) {<br>
> +                                     t = (*keyword->handler) (strvec);<br>
> +                                     r += t;<br>
> +                                     if (t)<br>
> +                                             condlog(1, "multipath.conf +%d parsing failed: %s",<br>
> +                                                     line_nr, buf);<br>
> +                             }<br>
><br>
>                               if (keyword->sub) {<br>
>                                       kw_level++;<br>
<br>
</div></div>Further below<br>
condlog(1, "multipath.conf +%d, invalid keyword: %s", line_nr, str);<br>
is used, so maybe also add a comma after the line number too.<br>
<span class="HOEnZb"><font color="#888888"><br>
Sebastian<br>
</font></span></blockquote></div><br></div>