Get rid of E_INVALID_COMMAND.
authorAndre Noll <maan@systemlinux.org>
Sun, 16 Mar 2008 16:07:26 +0000 (17:07 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 16 Mar 2008 16:07:26 +0000 (17:07 +0100)
dss.c
error.h

diff --git a/dss.c b/dss.c
index 121cee4..665185f 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -43,7 +43,8 @@ COMMANDS
 int call_command_handler(int argc, char * const * const argv)
 {
        COMMANDS
-       return -E_INVALID_COMMAND;
+       DSS_EMERG_LOG("BUG: did not find command handler\n");
+       exit(EXIT_FAILURE);
 }
 #undef COMMAND
 #undef COMMANDS
diff --git a/error.h b/error.h
index b9cbfec..d54845d 100644 (file)
--- a/error.h
+++ b/error.h
@@ -54,7 +54,6 @@ static inline void log_err_msg(int loglevel, int num)
 #define DSS_ERRORS \
        DSS_ERROR(SUCCESS, "success") \
        DSS_ERROR(SYNTAX, "syntax error") \
-       DSS_ERROR(INVALID_COMMAND, "invalid command") \
        DSS_ERROR(ATOI_OVERFLOW, "value too large") \
        DSS_ERROR(STRTOLL, "unknown strtoll error") \
        DSS_ERROR(ATOI_NO_DIGITS, "no digits found in string") \