]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: print error number in pcv messages
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 26 Apr 2011 11:22:58 +0000 (14:22 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 29 Apr 2011 18:19:58 +0000 (21:19 +0300)
In pcv() messages also print the error number - this is useful when
an error happens and it is not because of EROFS.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index 5afc1e9a651f6ee82aa9b244307fc0d5c0186146..ac72c5b6e3b7cc425d41db582bcaff4f58110f40 100644 (file)
@@ -71,7 +71,8 @@
 
 #define pcv(fmt, ...) do {                                                   \
        if (!args.power_cut_mode || (args.power_cut_mode && args.verbose))   \
-               normsg(fmt " (line %d)", ##__VA_ARGS__, __LINE__);           \
+               normsg(fmt " (line %d, error %d (%s))",                      \
+                      ##__VA_ARGS__, __LINE__, errno, strerror(errno));     \
        if (!args.power_cut_mode)                                            \
                CHECK(0);                                                    \
 } while(0)