[PATCH] generic/486: Get rid of the redundant error=%d printing

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxxxxxx>
---
 src/attr_replace_test.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c
index 23adc07..33fa74d 100644
--- a/src/attr_replace_test.c
+++ b/src/attr_replace_test.c
@@ -11,7 +11,6 @@
 #include <sys/stat.h>
 
 #define die() do { perror(""); \
-fprintf(stderr, "error=%d at line %d\n", errno, __LINE__); \
 exit(1); } while (0)
 
 #define fail(...) do { \
-- 
1.8.3.1



--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux