libibmad: libibumad: Print warnings and errors to stderr not stdout
PATCH 1/1 libibmad: libibumad: Print warnings and errors to stderr not stdout
From: Ira Weiny <[email protected]>
Date: Tue, 17 Nov 2009 14:39:37 -0800
Subject: [PATCH] libibmad: libibumad: Print warnings and errors to stderr not stdout
Signed-off-by Ira Weiny <[email protected]>
--- libibmad/include/infiniband/mad.h | 4 ++-- libibumad/src/umad.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
libibmad/include/infiniband/mad.h +2 -2
@@ -1018,11 +1018,11 @@ static inline uint64_t htonll(uint64_t x)#define ALIGN (l, size) (((l) + ((size) - 1)) / (size) * (size))/** printf style warning MACRO, includes name of function and pid */ -#define IBWARN (fmt, ...) fprintf(stdout, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__) +#define IBWARN (fmt, ...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## __VA_ARGS__)/** printf style abort MACRO, includes name of function and pid */ #define IBPANIC (fmt, ...) do { \ - fprintf(stdout, "ibpanic: [%d] %s: " fmt ": %m\n", getpid(), __func__, ## __VA_ARGS__); \ + fprintf(stderr, "ibpanic: [%d] %s: " fmt ": %m\n", getpid(), __func__, ## __VA_ARGS__); \ exit(-1); \ } while(0)
libibumad/src/umad.c +1 -1
@@ -83,7 +83,7 @@ extern int sys_read_gid(char *dir_name, char *file_name, uint8_t * gid);extern int sys_read_uint64 (char *dir_name,char *file_name,uint64_t * u);extern int sys_read_uint (char *dir_name,char *file_name,unsigned *u); -#define IBWARN(fmt, args...) fprintf(stdout, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## args) +#define IBWARN(fmt, args...) fprintf(stderr, "ibwarn: [%d] %s: " fmt "\n", getpid(), __func__, ## args)#define TRACE if (umaddebug) IBWARN#define DEBUG if (umaddebug) IBWARN
Signature · 6 lines
1.5.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Sasha Khapyorsky
AppliedQuoted 7 lines · Ira Weiny
From: Ira Weiny <[email protected]>
Date: Tue, 17 Nov 2009 14:39:37 -0800
Subject: [PATCH] libibmad: libibumad: Print warnings and errors to stderr not stdoutSigned-off-by Ira Weiny <[email protected]>
Applied. Thanks.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html