mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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>
This commit is contained in:
@@ -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 { \
|
||||
|
||||
Reference in New Issue
Block a user