[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8c9caf12-178b-b228-09fc-abd3d043993a@akamai.com>
Date: Fri, 10 Nov 2017 16:44:08 -0500
From: Jason Baron <jbaron@...mai.com>
To: Randy Dunlap <rdunlap@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/2] dynamic_debug: fix optional/omitted ending line
number to be LARGE instead of 0
On 11/09/2017 04:52 PM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@...radead.org>
>
> line-range is supposed to treat "1-" as "1-endoffile", so
> handle the special case by setting last_lineno to UINT_MAX.
>
> Fixes this error:
>
> dynamic_debug:ddebug_parse_query: last-line:0 < 1st-line:1
> dynamic_debug:ddebug_exec_query: query parse failed
>
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Jason Baron <jbaron@...mai.com>
> ---
> lib/dynamic_debug.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --- lnx-414-rc8.orig/lib/dynamic_debug.c
> +++ lnx-414-rc8/lib/dynamic_debug.c
> @@ -360,6 +360,10 @@ static int ddebug_parse_query(char *word
> if (parse_lineno(last, &query->last_lineno) < 0)
> return -EINVAL;
>
> + /* special case for last lineno not specified */
> + if (query->last_lineno == 0)
> + query->last_lineno = UINT_MAX;
> +
> if (query->last_lineno < query->first_lineno) {
> pr_err("last-line:%d < 1st-line:%d\n",
> query->last_lineno,
>
Acked-by: Jason Baron <jbaron@...mai.com>
Powered by blists - more mailing lists