From 45f9258c7fc11e145b5197a076bedf935ace9249 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 5 Jan 2018 02:09:58 +0100 Subject: errno: replace EIO with ENOENT --- include/errno.h | 2 +- lib/fmt.c | 4 ++-- src/string.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/errno.h b/include/errno.h index d935f1c..f1987f6 100644 --- a/include/errno.h +++ b/include/errno.h @@ -26,7 +26,7 @@ #define EINVAL 1 #define EAGAIN 2 #define ENOMEM 3 -#define EIO 4 +#define ENOENT 4 #define EBUSY 5 #define EEXIST 6 diff --git a/lib/fmt.c b/lib/fmt.c index f180606..58186f8 100644 --- a/lib/fmt.c +++ b/lib/fmt.c @@ -409,7 +409,7 @@ fmt_sprintf_state_consume(struct fmt_sprintf_state *state) c = fmt_consume(&state->format); if (c == '\0') { - return EIO; + return ENOENT; } if (c != '%') { @@ -1091,7 +1091,7 @@ fmt_sscanf_state_consume(struct fmt_sscanf_state *state) c = fmt_consume(&state->format); if (c == '\0') { - return EIO; + return ENOENT; } if (c != '%') { diff --git a/src/string.c b/src/string.c index dbdb234..7d737c7 100644 --- a/src/string.c +++ b/src/string.c @@ -155,8 +155,8 @@ strerror(int errnum) return "resource temporarily unavailable"; case ENOMEM: return "not enough space"; - case EIO: - return "input/output error"; + case ENOENT: + return "no such file or directory"; case EBUSY: return "resource busy"; case EEXIST: -- cgit v1.2.3