Message ID | c0e1648e-06cc-9c79-05f7-4fc06dd3617a@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Ira Weiny |
Headers | show |
On Wed, Feb 07, 2018 at 12:05:40PM -0500, Hal Rosenstock wrote: > > when debug is set > > Signed-off-by: Hal Rosenstock <hal@mellanox.com> > --- > Change from v1: > Only print when debug is set > > src/smpdump.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/smpdump.c b/src/smpdump.c > index bc8559a..efc522f 100644 > --- a/src/smpdump.c > +++ b/src/smpdump.c > @@ -281,6 +281,9 @@ int main(int argc, char *argv[]) > if (umad_recv(portid, umad, &length, -1) != mad_agent) > IBPANIC("recv error: %s", strerror(errno)); > > + if (ibdebug) > + fprintf(stdout, "%d bytes received\n", length); To match the other debug output I changed this to stderr. Applied thanks, Ira > + > if (!dump_char) { > xdump(stdout, 0, smp->data, 64); > if (smp->status) > -- > 2.8.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2/8/2018 1:20 AM, ira.weiny wrote: > On Wed, Feb 07, 2018 at 12:05:40PM -0500, Hal Rosenstock wrote: >> >> when debug is set >> >> Signed-off-by: Hal Rosenstock <hal@mellanox.com> >> --- >> Change from v1: >> Only print when debug is set >> >> src/smpdump.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/smpdump.c b/src/smpdump.c >> index bc8559a..efc522f 100644 >> --- a/src/smpdump.c >> +++ b/src/smpdump.c >> @@ -281,6 +281,9 @@ int main(int argc, char *argv[]) >> if (umad_recv(portid, umad, &length, -1) != mad_agent) >> IBPANIC("recv error: %s", strerror(errno)); >> >> + if (ibdebug) >> + fprintf(stdout, "%d bytes received\n", length); > > To match the other debug output I changed this to stderr. debug output also uses stdout (see DEBUG or IBDEBUG macros). Anyhow, stderr is fine for this. > Applied thanks, Thanks. -- Hal > Ira > >> + >> if (!dump_char) { >> xdump(stdout, 0, smp->data, 64); >> if (smp->status) >> -- >> 2.8.4 >> > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/smpdump.c b/src/smpdump.c index bc8559a..efc522f 100644 --- a/src/smpdump.c +++ b/src/smpdump.c @@ -281,6 +281,9 @@ int main(int argc, char *argv[]) if (umad_recv(portid, umad, &length, -1) != mad_agent) IBPANIC("recv error: %s", strerror(errno)); + if (ibdebug) + fprintf(stdout, "%d bytes received\n", length); + if (!dump_char) { xdump(stdout, 0, smp->data, 64); if (smp->status)
when debug is set Signed-off-by: Hal Rosenstock <hal@mellanox.com> --- Change from v1: Only print when debug is set src/smpdump.c | 3 +++ 1 file changed, 3 insertions(+)