Remove E_PERM.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 17 May 2022 14:17:32 +0000 (16:17 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 18 May 2022 20:43:16 +0000 (22:43 +0200)
There is only one user which may as well use the standard error code.

command.c
error.h

index 5b17f116d53c93956faf60f88d903b233b7e9b69..e3f12931fd9d17fe5489636919a14379d60d0969 100644 (file)
--- a/command.c
+++ b/command.c
@@ -828,7 +828,7 @@ static int run_command(struct command_context *cc, struct iovec *iov)
        }
        perms = server_command_perms[ret];
        if ((perms & cc->u->perms) != perms)
        }
        perms = server_command_perms[ret];
        if ((perms & cc->u->perms) != perms)
-               return -E_PERM;
+               return -ERRNO_TO_PARA_ERROR(EPERM);
        lcmd = lls_cmd(ret, server_cmd_suite);
        end = iov->iov_base + iov->iov_len;
        for (i = 0; p < end; i++)
        lcmd = lls_cmd(ret, server_cmd_suite);
        end = iov->iov_base + iov->iov_len;
        for (i = 0; p < end; i++)
diff --git a/error.h b/error.h
index cd5c20ef8f44501429ea8a9ab16b4bfe25d62b54..60c23294d1270c9aa8b4f56d69a1def2f1fac9b8 100644 (file)
--- a/error.h
+++ b/error.h
        PARA_ERROR(OPUS_HEADER, "invalid opus header"), \
        PARA_ERROR(OPUS_SET_GAIN, "opus: could not set gain"), \
        PARA_ERROR(PATH_FOUND, ""), /* not really an error */ \
        PARA_ERROR(OPUS_HEADER, "invalid opus header"), \
        PARA_ERROR(OPUS_SET_GAIN, "opus: could not set gain"), \
        PARA_ERROR(PATH_FOUND, ""), /* not really an error */ \
-       PARA_ERROR(PERM, "permission denied"), \
        PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
        PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
        PARA_ERROR(PREBUFFER_SUCCESS, "prebuffering complete"), \
        PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
        PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
        PARA_ERROR(PREBUFFER_SUCCESS, "prebuffering complete"), \