]> www.infradead.org Git - mtd-utils.git/commitdiff
ubi-tests: add normsg
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 14 Jun 2010 08:35:26 +0000 (11:35 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 14 Jun 2010 08:35:26 +0000 (11:35 +0300)
Just like we have in ubi-utils.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/ubi-tests/common.h

index 86357cb98dd8ce0d5d52fa376b04bff39ba9db73..859af14451ec1427bc1fe66fad249bf8e6528d38 100644 (file)
@@ -24,6 +24,7 @@
 #define __COMMON_H__
 
 #include <string.h>
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -35,6 +36,11 @@ extern "C" {
 
 #define min(a, b) ((a) < (b) ? (a) : (b))
 
+/* Normal messages */
+#define normsg(fmt, ...) do {                                                  \
+        printf(TESTNAME ": " fmt "\n", ##__VA_ARGS__);                         \
+} while(0)
+
 #define errmsg(fmt, ...) ({                                                    \
        __errmsg(TESTNAME, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__);        \
        -1;                                                                    \