* [PATCH] ibsim/sim_cmd.c: Allow error command on attributes for switch port 0
@ 2012-06-25 14:26 Hal Rosenstock
[not found] ` <4FE87510.8070003-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-06-25 14:26 UTC (permalink / raw)
To: Alex Netes
Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/ibsim/sim_cmd.c b/ibsim/sim_cmd.c
index 6d3a893..81e9bfa 100644
--- a/ibsim/sim_cmd.c
+++ b/ibsim/sim_cmd.c
@@ -288,7 +288,7 @@ static int do_seterror(FILE * f, char *line)
char *s = line;
char *nodeid = 0, name[NAMELEN], *sp, *orig = 0;
int portnum = -1; // def - all ports
- int numports, set = 0, rate = 0;
+ int startport, numports, set = 0, rate = 0;
uint16_t attr = 0;
if (strsep(&s, "\""))
@@ -309,8 +309,12 @@ static int do_seterror(FILE * f, char *line)
}
if (sp) {
+ if (node->type == SWITCH_NODE)
+ startport = 0;
+ else
+ startport = 1;
portnum = strtoul(sp, 0, 0);
- if (portnum < 1 || portnum > node->numports) {
+ if (portnum < startport || portnum > node->numports) {
fprintf(f, "# bad port number %d at nodeid \"%s\"\n",
portnum, nodeid);
return -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] ibsim/sim_cmd.c: Allow error command on attributes for switch port 0
[not found] ` <4FE87510.8070003-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2012-10-11 12:47 ` Alex Netes
0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2012-10-11 12:47 UTC (permalink / raw)
To: Hal Rosenstock
Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
Hi Hal,
On 10:26 Mon 25 Jun , Hal Rosenstock wrote:
>
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
Applied, thanks.
--
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:[~2012-10-11 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 14:26 [PATCH] ibsim/sim_cmd.c: Allow error command on attributes for switch port 0 Hal Rosenstock
[not found] ` <4FE87510.8070003-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-10-11 12:47 ` Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).