From 162142b7930248d83a77e8d8f4eba5896d5b267a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 24 Nov 2019 16:36:20 +0100 Subject: Cleanup libsquashfs invalid argument error codes - Add an explicit "you're holding it wrong" error code. - Consistently return error codes and not have some special places where -1 is returned. Signed-off-by: David Oberhollenzer --- lib/common/perror.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/common') diff --git a/lib/common/perror.c b/lib/common/perror.c index 9b9f041..a0a86aa 100644 --- a/lib/common/perror.c +++ b/lib/common/perror.c @@ -58,6 +58,9 @@ void sqfs_perror(const char *file, const char *action, int error_code) case SQFS_ERROR_NOT_FILE: errstr = "target is not a file"; break; + case SQFS_ERROR_ARG_INVALID: + errstr = "invalid argument"; + break; default: errstr = "libsquashfs returned an unknown error code"; break; -- cgit v1.2.3