aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-11-01 00:50:12 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-11-01 00:50:12 -0400
commit1e552d3d89bc6658c687849ab59fc62577e9fef3 (patch)
tree074a77dfae67a62cc8960e26fe4d0b720e210494
parent18a5252729ace3eae1b9291dbc71dc0d4e9b6580 (diff)
downloadstasis-1e552d3d89bc6658c687849ab59fc62577e9fef3.tar.gz
Fix SYSERROR macro
* "info" was always printed instead of the errno string. Now it prints the error and returns "info" on "Success"
-rw-r--r--include/core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/core.h b/include/core.h
index b0a1a11..b8b047f 100644
--- a/include/core.h
+++ b/include/core.h
@@ -12,7 +12,7 @@
#include <sys/statvfs.h>
#define SYSERROR(MSG, ...) do { \
- fprintf(stderr, "%s:%s:%d:%s - ", path_basename(__FILE__), __FUNCTION__, __LINE__, strerror(errno) ? "info" : strerror(errno)); \
+ fprintf(stderr, "%s:%s:%d:%s - ", path_basename(__FILE__), __FUNCTION__, __LINE__, (errno > 0) ? strerror(errno) : "info"); \
fprintf(stderr, MSG LINE_SEP, __VA_ARGS__); \
} while (0)
#define STASIS_BUFSIZ 8192