From: Artem Bityutskiy Date: Tue, 26 Apr 2011 11:22:58 +0000 (+0300) Subject: fs-tests: integck: print error number in pcv messages X-Git-Tag: v1.4.5~54 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e15b521f764216b598d5c510c8a76a643a1bf901;p=mtd-utils.git fs-tests: integck: print error number in pcv messages 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 --- diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index 5afc1e9..ac72c5b 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -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)