aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2017-03-12 18:47:08 +0100
committerMarc Schink <swo-dev@marcschink.de>2017-03-12 19:14:29 +0100
commit87be021559f1d37d7bf04306c778a767153c413f (patch)
tree724518fb654dc94eb80db0b77327e375b4afebdf
parent6d8145a732f5cab256622f7da4fd3a21a2f11678 (diff)
Add LIBSWO_ERR_NO_SPACE
-rw-r--r--libswo/error.c4
-rw-r--r--libswo/libswo.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/libswo/error.c b/libswo/error.c
index 4e2ba6d..b0d7efa 100644
--- a/libswo/error.c
+++ b/libswo/error.c
@@ -46,6 +46,8 @@ LIBSWO_API const char *libswo_strerror(int error_code)
return "memory allocation error";
case LIBSWO_ERR_ARG:
return "invalid argument";
+ case LIBSWO_ERR_NO_SPACE:
+ return "no space left";
default:
return "unknown error";
}
@@ -73,6 +75,8 @@ LIBSWO_API const char *libswo_strerror_name(int error_code)
return "LIBSWO_ERR_MALLOC";
case LIBSWO_ERR_ARG:
return "LIBSWO_ERR_ARG";
+ case LIBSWO_ERR_NO_SPACE:
+ return "LIBSWO_ERR_NO_SPACE";
default:
return "unknown error code";
}
diff --git a/libswo/libswo.h b/libswo/libswo.h
index 2a9f4f1..e4aeaf9 100644
--- a/libswo/libswo.h
+++ b/libswo/libswo.h
@@ -44,7 +44,9 @@ enum libswo_error {
/** Memory allocation error. */
LIBSWO_ERR_MALLOC = -2,
/** Invalid argument. */
- LIBSWO_ERR_ARG = -3
+ LIBSWO_ERR_ARG = -3,
+ /** No space left. */
+ LIBSWO_ERR_NO_SPACE = -4
};
/** libswo log levels. */