summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-05 02:09:58 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-05 02:09:58 +0100
commit45f9258c7fc11e145b5197a076bedf935ace9249 (patch)
tree728decff25091a70bb7fe963d828910bdb8ad2ed
parent62d27d872769ebcd79a931fa07b1128576e65e65 (diff)
errno: replace EIO with ENOENT
-rw-r--r--include/errno.h2
-rw-r--r--lib/fmt.c4
-rw-r--r--src/string.c4
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: