diff options
author | Xiao Yang <yangx.jy@cn.fujitsu.com> | 2018-05-17 11:32:27 +0800 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2018-05-18 14:31:20 +0800 |
commit | 287b2e05b52789299dfddf56aec796e92de366e1 (patch) | |
tree | 035e3511fbb2fee885489746ff2ea4d6d1da7613 | |
parent | 3d112df8bdc313308f3788cf28e1574d4fb15d4c (diff) | |
download | xfstests-dev-287b2e05b52789299dfddf56aec796e92de366e1.tar.gz |
generic/486: Get rid of the redundant error=%d printing
1) Without the fix, perror() can indicate the actual error(ENODATA).
2) After calling perror() and redirecting the output of perror()
to a file, errno seems to be set to EINVAL unexpectedly.
See the following mail for detailed info:
https://www.spinics.net/lists/fstests/msg09675.html
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r-- | src/attr_replace_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c index 23adc072e5..0720bfdc18 100644 --- a/src/attr_replace_test.c +++ b/src/attr_replace_test.c @@ -11,7 +11,7 @@ #include <sys/stat.h> #define die() do { perror(""); \ -fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \ +fprintf(stderr, "error at line %d\n", __LINE__); \ exit(1); } while (0) #define fail(...) do { \ |