tracing: fix trace_buf_size boot option
Subsystems (2)
PATCH 1/1 tracing: fix trace_buf_size boot option
We should be able to specify [KMG] when setting trace_buf_size boot option, as documented in kernel-parameters.txt
[ Impact: allow to specify [KMG] in trace_buf_size boot option ]
--- Documentation/kernel-parameters.txt | 3 ++- kernel/trace/trace.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/kernel-parameters.txt +2 -1
@@ -2446,7 +2446,8 @@ and is between 256 and 4096 characters. It is defined in the file tp720= [HW,PS2] - trace_buf_size=nn[KMG] [ftrace] will set tracing buffer size. + trace_buf_size=nn[KMG] + [FTRACE] will set tracing buffer size. trix= [HW,OSS] MediaTrix AudioTrix Pro Format:
kernel/trace/trace.c +2 -3
@@ -284,13 +284,12 @@ void trace_wake_up(void)static int __init set_buf_size (char *str) {unsigned long buf_size; -int ret;if (!str)return 0 ; - ret =strict_strtoul (str,0 , &buf_size); + buf_size =memparse (str, &opt);/* nr_entries can not be zero */ -if (ret <0 || buf_size ==0 ) +if (buf_size ==0 )return 0 ; trace_buf_size = buf_size;return 1 ;
Signature · 1 line
1.5.4.rc3
Review
Quoted 2 lines
(quoted diff) +1
-1- ret = strict_strtoul(str, 0, &buf_size); + buf_size = memparse(str, &opt);
Sorry, there's a typo: s/opt/str. I forgot to commit the change after fixing it.
========================
[PATCH] tracing: fix trace_buf_size boot option
We should be able to specify [KMG] when setting trace_buf_size boot option, as documented in kernel-parameters.txt
[ Impact: allow to specify [KMG] in trace_buf_size boot option ]
--- Documentation/kernel-parameters.txt | 3 ++- kernel/trace/trace.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/kernel-parameters.txt +2 -1
@@ -2446,7 +2446,8 @@ and is between 256 and 4096 characters. It is defined in the file tp720= [HW,PS2] - trace_buf_size=nn[KMG] [ftrace] will set tracing buffer size. + trace_buf_size=nn[KMG] + [FTRACE] will set tracing buffer size. trix= [HW,OSS] MediaTrix AudioTrix Pro Format:
kernel/trace/trace.c +2 -3
@@ -284,13 +284,12 @@ void trace_wake_up(void)static int __init set_buf_size (char *str) {unsigned long buf_size; -int ret;if (!str)return 0 ; - ret =strict_strtoul (str,0 , &buf_size); + buf_size =memparse (str, &str);/* nr_entries can not be zero */ -if (ret <0 || buf_size ==0 ) +if (buf_size ==0 )return 0 ; trace_buf_size = buf_size;return 1 ;
Signature · 1 line
1.5.4.rc3
[tip:tracing/urgent] tracing: Fix trace_buf_size boot option
Commit-ID: 9d612beff5089b89a295a2331883a8ce3fff08c1 Gitweb: http://git.kernel.org/tip/9d612beff5089b89a295a2331883a8ce3fff08c1 Author: Li Zefan <[email protected]> AuthorDate: Wed, 24 Jun 2009 17:33:15 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 24 Jun 2009 11:41:12 +0200
tracing: Fix trace_buf_size boot option
We should be able to specify [KMG] when setting trace_buf_size boot option, as documented in kernel-parameters.txt
LKML-Reference: <[email protected]>
--- Documentation/kernel-parameters.txt | 3 ++- kernel/trace/trace.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/kernel-parameters.txt +2 -1
@@ -2475,7 +2475,8 @@ and is between 256 and 4096 characters. It is defined in the file tp720= [HW,PS2] - trace_buf_size=nn[KMG] [ftrace] will set tracing buffer size. + trace_buf_size=nn[KMG] + [FTRACE] will set tracing buffer size. trix= [HW,OSS] MediaTrix AudioTrix Pro Format:
kernel/trace/trace.c +2 -3
@@ -284,13 +284,12 @@ void trace_wake_up(void)static int __init set_buf_size (char *str) {unsigned long buf_size; -int ret;if (!str)return 0 ; - ret =strict_strtoul (str,0 , &buf_size); + buf_size =memparse (str, &str);/* nr_entries can not be zero */ -if (ret <0 || buf_size ==0 ) +if (buf_size ==0 )return 0 ; trace_buf_size = buf_size;return 1 ;