diff mbox

lib: fwts_framework: fix unnecessary escaping

Message ID 1347037098-8326-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Sept. 7, 2012, 4:58 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The log-format help information contains unneccessary and incorrect
escaping, found using the smatch tool.  These need fixing.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_framework.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung Sept. 10, 2012, 1:37 a.m. UTC | #1
On 09/08/2012 12:58 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The log-format help information contains unneccessary and incorrect
> escaping, found using the smatch tool.  These need fixing.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_framework.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 30645b6..927ee54 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -52,7 +52,7 @@ static fwts_option fwts_framework_options[] = {
>   	{ "results-no-separators", "", 0, "No horizontal separators in results log." },
>   	{ "log-filter", 	"",   1, "Define filters to dump out specific log fields: --log-filter=RES,SUM - dump out results and summary, --log-filter=ALL,~INF - dump out all fields except info fields." },
>   	{ "log-fields", 	"",   0, "Show available log filtering fields." },
> -	{ "log-format", 	"",   1, "Define output log format:  e.g. --log-format=\"\%date \%time [\%field] (\%owner): \".  Fields are: \%time - time, \%field - filter field, \%owner - name of test, \%level - failure error level, \%line - log line number." },
> +	{ "log-format", 	"",   1, "Define output log format:  e.g. --log-format=\"%date %time [%field] (%owner): \".  Fields are: %time - time, %field - filter field, %owner - name of test, %level - failure error level, %line - log line number." },
>   	{ "show-progress", 	"p",  0, "Output test progress report to stderr." },
>   	{ "show-tests", 	"s",  0, "Show available tests." },
>   	{ "klog", 		"k:", 1, "Specify kernel log file rather than reading it from the kernel, e.g. --klog=dmesg.log" },
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin Sept. 11, 2012, 6:17 a.m. UTC | #2
On Sat, Sep 8, 2012 at 12:58 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The log-format help information contains unneccessary and incorrect
> escaping, found using the smatch tool.  These need fixing.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_framework.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 30645b6..927ee54 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -52,7 +52,7 @@ static fwts_option fwts_framework_options[] = {
>         { "results-no-separators", "", 0, "No horizontal separators in results log." },
>         { "log-filter",         "",   1, "Define filters to dump out specific log fields: --log-filter=RES,SUM - dump out results and summary, --log-filter=ALL,~INF - dump out all fields except info fields." },
>         { "log-fields",         "",   0, "Show available log filtering fields." },
> -       { "log-format",         "",   1, "Define output log format:  e.g. --log-format=\"\%date \%time [\%field] (\%owner): \".  Fields are: \%time - time, \%field - filter field, \%owner - name of test, \%level - failure error level, \%line - log line number." },
> +       { "log-format",         "",   1, "Define output log format:  e.g. --log-format=\"%date %time [%field] (%owner): \".  Fields are: %time - time, %field - filter field, %owner - name of test, %level - failure error level, %line - log line number." },
>         { "show-progress",      "p",  0, "Output test progress report to stderr." },
>         { "show-tests",         "s",  0, "Show available tests." },
>         { "klog",               "k:", 1, "Specify kernel log file rather than reading it from the kernel, e.g. --klog=dmesg.log" },
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index 30645b6..927ee54 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -52,7 +52,7 @@  static fwts_option fwts_framework_options[] = {
 	{ "results-no-separators", "", 0, "No horizontal separators in results log." },
 	{ "log-filter", 	"",   1, "Define filters to dump out specific log fields: --log-filter=RES,SUM - dump out results and summary, --log-filter=ALL,~INF - dump out all fields except info fields." },
 	{ "log-fields", 	"",   0, "Show available log filtering fields." },
-	{ "log-format", 	"",   1, "Define output log format:  e.g. --log-format=\"\%date \%time [\%field] (\%owner): \".  Fields are: \%time - time, \%field - filter field, \%owner - name of test, \%level - failure error level, \%line - log line number." },
+	{ "log-format", 	"",   1, "Define output log format:  e.g. --log-format=\"%date %time [%field] (%owner): \".  Fields are: %time - time, %field - filter field, %owner - name of test, %level - failure error level, %line - log line number." },
 	{ "show-progress", 	"p",  0, "Output test progress report to stderr." },
 	{ "show-tests", 	"s",  0, "Show available tests." },
 	{ "klog", 		"k:", 1, "Specify kernel log file rather than reading it from the kernel, e.g. --klog=dmesg.log" },