projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c703d6
)
dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead...
author
Randy Dunlap
<
[email protected]
>
Fri, 17 Nov 2017 23:27:35 +0000
(15:27 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 18 Nov 2017 00:10:01 +0000
(16:10 -0800)
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
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Randy Dunlap <
[email protected]
>
Acked-by: Jason Baron <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/dynamic_debug.c
patch
|
blob
|
history
diff --git
a/lib/dynamic_debug.c
b/lib/dynamic_debug.c
index da796e2dc4f506dc63db68b132180acff00c291f..c7c96bc7654af7c4d5f3c8bbf595989f9b3d0ebf 100644
(file)
--- a/
lib/dynamic_debug.c
+++ b/
lib/dynamic_debug.c
@@
-360,6
+360,10
@@
static int ddebug_parse_query(char *words[], int nwords,
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,