* [PATCH 1/2] ibsim: Fix PerformanceSet parsing corner case
@ 2013-02-08 0:45 Albert Chu
[not found] ` <1360284301.17736.154.camel-akkeaxHeDKRliZ7u+bvwcg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Albert Chu @ 2013-02-08 0:45 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Parse of attribute did not properly remove whitespace before it. So
PerformanceSet "H-0002c90300325280" PortCounters.SymbolErrorCounter=3
would work but
PerformanceSet "H-0002c90300325280" PortCounters.SymbolErrorCounter=3\
would not.
Signed-off-by: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
---
ibsim/sim_cmd.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ibsim/sim_cmd.c b/ibsim/sim_cmd.c
index f44df93..83ad52d 100644
--- a/ibsim/sim_cmd.c
+++ b/ibsim/sim_cmd.c
@@ -911,7 +911,9 @@ static int do_perf_counter_set(FILE *f, char *line)
return -1;
}
- strsep(&s, " ");
+ if (s && *s)
+ while (isspace(*s))
+ s++;
attr = strsep(&s, ".");
if(s == NULL)
goto format_error;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] ibsim: Fix PerformanceSet parsing corner case
[not found] ` <1360284301.17736.154.camel-akkeaxHeDKRliZ7u+bvwcg@public.gmane.org>
@ 2013-06-05 19:39 ` Hal Rosenstock
0 siblings, 0 replies; 2+ messages in thread
From: Hal Rosenstock @ 2013-06-05 19:39 UTC (permalink / raw)
To: Albert Chu; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 2/7/2013 7:45 PM, Albert Chu wrote:
> Parse of attribute did not properly remove whitespace before it. So
>
> PerformanceSet "H-0002c90300325280" PortCounters.SymbolErrorCounter=3
>
> would work but
>
> PerformanceSet "H-0002c90300325280" PortCounters.SymbolErrorCounter=3\
>
> would not.
>
> Signed-off-by: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
Thanks. Applied.
-- Hal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-05 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-08 0:45 [PATCH 1/2] ibsim: Fix PerformanceSet parsing corner case Albert Chu
[not found] ` <1360284301.17736.154.camel-akkeaxHeDKRliZ7u+bvwcg@public.gmane.org>
2013-06-05 19:39 ` Hal Rosenstock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox