Skip to content

Commit

Permalink
Renumbered failure exits to be > 256
Browse files Browse the repository at this point in the history
This is necessary as in at least one place (mythwelcome) we use the exit code
byte bitmapped.  The only way for that to work correctly is if we are not
mapping our errors into the same space.  As any users of myth_system should be
either testing for 0/non-zero, or looking for specific errors, this shouldn't
affect anything.
  • Loading branch information
Beirdo committed Dec 3, 2010
1 parent 37b9c53 commit 91daefa
Showing 1 changed file with 74 additions and 82 deletions.
156 changes: 74 additions & 82 deletions mythtv/libs/libmythdb/exitcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
// 8-bit masked integer.

#define GENERIC_EXIT_OK 0
#define GENERIC_EXIT_NOT_OK 255
#define GENERIC_EXIT_NO_MYTHCONTEXT 254
#define GENERIC_EXIT_NO_THEME 253
#define GENERIC_EXIT_INVALID_CMDLINE 252
#define GENERIC_EXIT_DB_OUTOFDATE 251
#define GENERIC_EXIT_DB_ERROR 250
#define GENERIC_EXIT_SOCKET_ERROR 249
#define GENERIC_EXIT_OPENING_LOGFILE_ERROR 248
#define GENERIC_EXIT_UNKNOWN_ERROR 247
#define GENERIC_EXIT_EXECL_ERROR 246
#define FIXME_BUG__LIBRARY_EXIT_NO_THEME 245
#define FIXME_BUG__LIBRARY_EXIT_TFW_FAILED_OPEN 244
#define GENERIC_EXIT_INVALID_TIMEZONE 243
#define GENERIC_EXIT_SIGNALLED 242
#define GENERIC_EXIT_TIMEOUT 241
#define GENERIC_EXIT_ABORTED 240
#define GENERIC_EXIT_RUNNING 239
#define GENERIC_EXIT_PIPE_FAILURE 238
#define GENERIC_EXIT_TERMINATED 237
#define GENERIC_EXIT_START 236
#define GENERIC_EXIT_CMD_NOT_FOUND 127
#define GENERIC_EXIT_NOT_OK 256
#define GENERIC_EXIT_CMD_NOT_FOUND 257
#define GENERIC_EXIT_EXECL_ERROR 258
#define GENERIC_EXIT_NO_MYTHCONTEXT 259
#define GENERIC_EXIT_NO_THEME 260
#define GENERIC_EXIT_INVALID_CMDLINE 261
#define GENERIC_EXIT_DB_OUTOFDATE 262
#define GENERIC_EXIT_DB_ERROR 263
#define GENERIC_EXIT_SOCKET_ERROR 264
#define GENERIC_EXIT_OPENING_LOGFILE_ERROR 265
#define GENERIC_EXIT_UNKNOWN_ERROR 266
#define FIXME_BUG__LIBRARY_EXIT_NO_THEME 267
#define FIXME_BUG__LIBRARY_EXIT_TFW_FAILED_OPEN 268
#define GENERIC_EXIT_INVALID_TIMEZONE 269
#define GENERIC_EXIT_SIGNALLED 270
#define GENERIC_EXIT_TIMEOUT 271
#define GENERIC_EXIT_ABORTED 272
#define GENERIC_EXIT_RUNNING 273
#define GENERIC_EXIT_PIPE_FAILURE 274
#define GENERIC_EXIT_TERMINATED 275
#define GENERIC_EXIT_START 275

// libmyth
#define MYTHSYSTEM__EXIT__EXECL_ERROR GENERIC_EXIT_EXECL_ERROR
Expand All @@ -48,8 +48,8 @@

#define FRONTEND_EXIT_INVALID_TIMEZONE GENERIC_EXIT_INVALID_TIMEZONE
#define FRONTEND_BUGGY_EXIT_NO_THEME GENERIC_EXIT_NO_THEME
#define FRONTEND_BUGGY_EXIT_NO_SELECTOR GENERIC_EXIT_START-1
#define FRONTEND_EXIT_START GENERIC_EXIT_START-1
#define FRONTEND_BUGGY_EXIT_NO_SELECTOR GENERIC_EXIT_START+1
#define FRONTEND_EXIT_START GENERIC_EXIT_START+1

// mythbackend
#define BACKEND_EXIT_OK GENERIC_EXIT_OK
Expand All @@ -59,78 +59,78 @@
#define BACKEND_EXIT_DB_ERROR GENERIC_EXIT_DB_ERROR
#define BACKEND_EXIT_INVALID_TIMEZONE GENERIC_EXIT_INVALID_TIMEZONE
#define BACKEND_EXIT_OPENING_LOGFILE_ERROR GENERIC_EXIT_OPENING_LOGFILE_ERROR
#define BACKEND_EXIT_NO_CONNECT GENERIC_EXIT_START-1
#define BACKEND_EXIT_NO_IP_ADDRESS GENERIC_EXIT_START-2
#define BACKEND_EXIT_CAP_CARD_SETUP_ERROR GENERIC_EXIT_START-3
#define BACKEND_EXIT_OPENING_PIDFILE_ERROR GENERIC_EXIT_START-4
#define BACKEND_EXIT_OPENING_VLOCKFILE_ERROR GENERIC_EXIT_START-5
#define BACKEND_EXIT_DAEMONIZING_ERROR GENERIC_EXIT_START-6

#define BACKEND_BUGGY_EXIT_NO_BIND_MAIN GENERIC_EXIT_START-7
#define BACKEND_BUGGY_EXIT_NO_BIND_STATUS GENERIC_EXIT_START-8
#define BACKEND_BUGGY_EXIT_UNKNOWN_ENC GENERIC_EXIT_START-9
#define BACKEND_BUGGY_EXIT_UNKNOWN_FILE_SOCK GENERIC_EXIT_START-10
#define BACKEND_EXIT_NO_CAP_CARD GENERIC_EXIT_START-11
#define BACKEND_EXIT_NO_CHAN_DATA GENERIC_EXIT_START-12
#define BACKEND_EXIT_PERMISSIONS_ERROR GENERIC_EXIT_START-13
#define BACKEND_EXIT_START GENERIC_EXIT_START-13
#define BACKEND_EXIT_NO_CONNECT GENERIC_EXIT_START+1
#define BACKEND_EXIT_NO_IP_ADDRESS GENERIC_EXIT_START+2
#define BACKEND_EXIT_CAP_CARD_SETUP_ERROR GENERIC_EXIT_START+3
#define BACKEND_EXIT_OPENING_PIDFILE_ERROR GENERIC_EXIT_START+4
#define BACKEND_EXIT_OPENING_VLOCKFILE_ERROR GENERIC_EXIT_START+5
#define BACKEND_EXIT_DAEMONIZING_ERROR GENERIC_EXIT_START+6

#define BACKEND_BUGGY_EXIT_NO_BIND_MAIN GENERIC_EXIT_START+7
#define BACKEND_BUGGY_EXIT_NO_BIND_STATUS GENERIC_EXIT_START+8
#define BACKEND_BUGGY_EXIT_UNKNOWN_ENC GENERIC_EXIT_START+9
#define BACKEND_BUGGY_EXIT_UNKNOWN_FILE_SOCK GENERIC_EXIT_START+10
#define BACKEND_EXIT_NO_CAP_CARD GENERIC_EXIT_START+11
#define BACKEND_EXIT_NO_CHAN_DATA GENERIC_EXIT_START+12
#define BACKEND_EXIT_PERMISSIONS_ERROR GENERIC_EXIT_START+13
#define BACKEND_EXIT_START GENERIC_EXIT_START+13

// mythtranscode
#define TRANSCODE_EXIT_OK GENERIC_EXIT_OK
#define TRANSCODE_EXIT_NO_MYTHCONTEXT GENERIC_EXIT_NO_MYTHCONTEXT
#define TRANSCODE_EXIT_DB_ERROR GENERIC_EXIT_DB_ERROR
#define TRANSCODE_EXIT_INVALID_CMDLINE GENERIC_EXIT_INVALID_CMDLINE
#define TRANSCODE_EXIT_UNKNOWN_ERROR GENERIC_EXIT_UNKNOWN_ERROR
#define TRANSCODE_EXIT_NO_RECORDING_DATA GENERIC_EXIT_START-1
#define TRANSCODE_EXIT_REMOTE_FILE GENERIC_EXIT_START-2
#define TRANSCODE_EXIT_ERROR_CUTLIST_UPDATE GENERIC_EXIT_START-3
#define TRANSCODE_EXIT_STOPPED GENERIC_EXIT_START-4

#define TRANSCODE_BUGGY_EXIT_INVALID_MARKER GENERIC_EXIT_START-5
#define TRANSCODE_BUGGY_EXIT_NO_AUDIO_BUFFERS GENERIC_EXIT_START-6
#define TRANSCODE_BUGGY_EXIT_NO_VIDEO_BUFFERS GENERIC_EXIT_START-7
#define TRANSCODE_BUGGY_EXIT_INVALID_OUT_PARAMS GENERIC_EXIT_START-8
#define TRANSCODE_BUGGY_EXIT_WRITE_FRAME_ERROR GENERIC_EXIT_START-9
#define TRANSCODE_BUGGY_EXIT_INVALID_AUDIO GENERIC_EXIT_START-10
#define TRANSCODE_BUGGY_EXIT_INVALID_VIDEO GENERIC_EXIT_START-11
#define TRANSCODE_BUGGY_EXIT_DEADLOCK GENERIC_EXIT_START-12
#define TRANSCODE_EXIT_RESTART GENERIC_EXIT_START-13
#define TRANSCODE_EXIT_START GENERIC_EXIT_START-13
#define TRANSCODE_EXIT_NO_RECORDING_DATA GENERIC_EXIT_START+1
#define TRANSCODE_EXIT_REMOTE_FILE GENERIC_EXIT_START+2
#define TRANSCODE_EXIT_ERROR_CUTLIST_UPDATE GENERIC_EXIT_START+3
#define TRANSCODE_EXIT_STOPPED GENERIC_EXIT_START+4

#define TRANSCODE_BUGGY_EXIT_INVALID_MARKER GENERIC_EXIT_START+5
#define TRANSCODE_BUGGY_EXIT_NO_AUDIO_BUFFERS GENERIC_EXIT_START+6
#define TRANSCODE_BUGGY_EXIT_NO_VIDEO_BUFFERS GENERIC_EXIT_START+7
#define TRANSCODE_BUGGY_EXIT_INVALID_OUT_PARAMS GENERIC_EXIT_START+8
#define TRANSCODE_BUGGY_EXIT_WRITE_FRAME_ERROR GENERIC_EXIT_START+9
#define TRANSCODE_BUGGY_EXIT_INVALID_AUDIO GENERIC_EXIT_START+10
#define TRANSCODE_BUGGY_EXIT_INVALID_VIDEO GENERIC_EXIT_START+11
#define TRANSCODE_BUGGY_EXIT_DEADLOCK GENERIC_EXIT_START+12
#define TRANSCODE_EXIT_RESTART GENERIC_EXIT_START+13
#define TRANSCODE_EXIT_START GENERIC_EXIT_START+13

// mythfilldatabase
#define FILLDB_EXIT_OK GENERIC_EXIT_OK
#define FILLDB_EXIT_NO_MYTHCONTEXT GENERIC_EXIT_NO_MYTHCONTEXT
#define FILLDB_EXIT_DB_ERROR GENERIC_EXIT_DB_ERROR
#define FILLDB_EXIT_INVALID_CMDLINE GENERIC_EXIT_INVALID_CMDLINE
#define FILLDB_EXIT_NO_CHAN_SRC GENERIC_EXIT_START-1
#define FILLDB_EXIT_UNKNOWN_ICON_GROUP GENERIC_EXIT_START-2
#define FILLDB_EXIT_GRAB_DATA_FAILED GENERIC_EXIT_START-3
#define FILLDB_EXIT_NO_CHAN_SRC GENERIC_EXIT_START+1
#define FILLDB_EXIT_UNKNOWN_ICON_GROUP GENERIC_EXIT_START+2
#define FILLDB_EXIT_GRAB_DATA_FAILED GENERIC_EXIT_START+3

#define FILLDB_BUGGY_EXIT_SRC_IS_DD GENERIC_EXIT_START-4
#define FILLDB_EXIT_START GENERIC_EXIT_START-4
#define FILLDB_BUGGY_EXIT_SRC_IS_DD GENERIC_EXIT_START+4
#define FILLDB_EXIT_START GENERIC_EXIT_START+4

// mythjobqueue
#define JOBQUEUE_EXIT_OK GENERIC_EXIT_OK
#define JOBQUEUE_EXIT_NO_MYTHCONTEXT GENERIC_EXIT_NO_MYTHCONTEXT
#define JOBQUEUE_EXIT_INVALID_CMDLINE GENERIC_EXIT_INVALID_CMDLINE
#define JOBQUEUE_EXIT_START GENERIC_EXIT_START
#define JOBQUEUE_EXIT_OPENING_PIDFILE_ERROR GENERIC_EXIT_START-1
#define JOBQUEUE_EXIT_DAEMONIZING_ERROR GENERIC_EXIT_START-2
#define JOBQUEUE_EXIT_OPENING_PIDFILE_ERROR GENERIC_EXIT_START+1
#define JOBQUEUE_EXIT_DAEMONIZING_ERROR GENERIC_EXIT_START+2
#define JOBQUEUE_EXIT_START GENERIC_EXIT_START+2

// mythtv
#define TV_EXIT_OK GENERIC_EXIT_OK
#define TV_EXIT_NO_MYTHCONTEXT GENERIC_EXIT_NO_MYTHCONTEXT
#define TV_EXIT_NO_THEME GENERIC_EXIT_NO_THEME
#define TV_EXIT_NO_AUDIO GENERIC_EXIT_START-1
#define TV_EXIT_NO_TV GENERIC_EXIT_START-2
#define TV_EXIT_START GENERIC_EXIT_START-2
#define TV_EXIT_NO_AUDIO GENERIC_EXIT_START+1
#define TV_EXIT_NO_TV GENERIC_EXIT_START+2
#define TV_EXIT_START GENERIC_EXIT_START+2

// mythtvosd
#define TVOSD_EXIT_OK GENERIC_EXIT_OK
#define TVOSD_EXIT_INVALID_CMDLINE GENERIC_EXIT_INVALID_CMDLINE
#define TVOSD_EXIT_SOCKET_ERROR GENERIC_EXIT_SOCKET_ERROR
#define TVOSD_EXIT_NO_TEMPLATE GENERIC_EXIT_START-1
#define TVOSD_EXIT_START GENERIC_EXIT_START-1
#define TVOSD_EXIT_NO_TEMPLATE GENERIC_EXIT_START+1
#define TVOSD_EXIT_START GENERIC_EXIT_START+1

// mythwelcome
#define WELCOME_BUGGY_EXIT_NO_THEME GENERIC_EXIT_NO_THEME
Expand All @@ -141,22 +141,14 @@

#define COMMFLAG_EXIT_NO_MYTHCONTEXT GENERIC_EXIT_NO_MYTHCONTEXT
#define COMMFLAG_EXIT_DB_ERROR GENERIC_EXIT_DB_ERROR
#define COMMFLAG_EXIT_INVALID_CHANID GENERIC_EXIT_START-1
#define COMMFLAG_EXIT_INVALID_STARTTIME GENERIC_EXIT_START-2
#define COMMFLAG_EXIT_INVALID_CMDLINE GENERIC_EXIT_START-3
#define COMMFLAG_EXIT_NO_PROGRAM_DATA GENERIC_EXIT_START-4
#define COMMFLAG_EXIT_IN_USE GENERIC_EXIT_START-5
#define COMMFLAG_BUGGY_EXIT_NO_CHAN_DATA GENERIC_EXIT_START-6
#define COMMFLAG_EXIT_NO_RINGBUFFER GENERIC_EXIT_START-7
#define COMMFLAG_EXIT_START GENERIC_EXIT_START-7

// MythTranscodeDaemon
#define MTD_EXIT_OK GENERIC_EXIT_OK
#define MTD_EXIT_NOT_OK GENERIC_EXIT_NOT_OK
#define MTD_EXIT_NO_MYTHCONTEXT GENERIC_EXIT_NO_MYTHCONTEXT
#define MTD_EXIT_INVALID_CMDLINE GENERIC_EXIT_INVALID_CMDLINE
#define MTD_EXIT_DB_ERROR GENERIC_EXIT_DB_ERROR
#define MTD_EXIT_DAEMONIZING_ERROR GENERIC_EXIT_START-1
#define COMMFLAG_EXIT_INVALID_CHANID GENERIC_EXIT_START+1
#define COMMFLAG_EXIT_INVALID_STARTTIME GENERIC_EXIT_START+2
#define COMMFLAG_EXIT_INVALID_CMDLINE GENERIC_EXIT_START+3
#define COMMFLAG_EXIT_NO_PROGRAM_DATA GENERIC_EXIT_START+4
#define COMMFLAG_EXIT_IN_USE GENERIC_EXIT_START+5
#define COMMFLAG_BUGGY_EXIT_NO_CHAN_DATA GENERIC_EXIT_START+6
#define COMMFLAG_EXIT_NO_RINGBUFFER GENERIC_EXIT_START+7
#define COMMFLAG_EXIT_START GENERIC_EXIT_START+7

// MythPreviewGen
#define PREVIEWGEN_EXIT_OK GENERIC_EXIT_OK
Expand Down

0 comments on commit 91daefa

Please sign in to comment.