PARA_ERROR(ALREADY_MAPPED, "file already mapped"), \
PARA_ERROR(BAD_SIZE, "invalid size specified"), \
PARA_ERROR(TRUNC, "failed to truncate file"), \
PARA_ERROR(ALREADY_MAPPED, "file already mapped"), \
PARA_ERROR(BAD_SIZE, "invalid size specified"), \
PARA_ERROR(TRUNC, "failed to truncate file"), \
PARA_ERROR(BAD_TABLE, "table not open"), \
PARA_ERROR(BAD_TABLE_DESC, "invalid table description"), \
PARA_ERROR(RB_KEY_EXISTS, "key already exists in rbtree"), \
PARA_ERROR(BAD_TABLE, "table not open"), \
PARA_ERROR(BAD_TABLE_DESC, "invalid table description"), \
PARA_ERROR(RB_KEY_EXISTS, "key already exists in rbtree"), \
PARA_ERROR(INDEX_CORRUPTION, "index corruption detected"), \
PARA_ERROR(INVALID_OBJECT, "reference to invalid object"), \
PARA_ERROR(STAT, "can not stat file"), \
PARA_ERROR(INDEX_CORRUPTION, "index corruption detected"), \
PARA_ERROR(INVALID_OBJECT, "reference to invalid object"), \
PARA_ERROR(STAT, "can not stat file"), \
PARA_ERROR(WRITE, "write error"), \
PARA_ERROR(LSEEK, "lseek error"), \
PARA_ERROR(BUSY, "table is busy"), \
PARA_ERROR(WRITE, "write error"), \
PARA_ERROR(LSEEK, "lseek error"), \
PARA_ERROR(BUSY, "table is busy"), \
#define MOOD_ERRORS \
PARA_ERROR(MOOD_SYNTAX, "mood syntax error"), \
PARA_ERROR(NO_MOOD, "no mood available"), \
#define MOOD_ERRORS \
PARA_ERROR(MOOD_SYNTAX, "mood syntax error"), \
PARA_ERROR(NO_MOOD, "no mood available"), \
PARA_ERROR(NO_ATTRIBUTES, "no attributes defined yet"), \
PARA_ERROR(ATT_TABLE_FULL, "no more space left in attribute table"), \
PARA_ERROR(NO_ATTRIBUTES, "no attributes defined yet"), \
PARA_ERROR(ATT_TABLE_FULL, "no more space left in attribute table"), \
#define BLOB_ERRORS \
PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \
PARA_ERROR(DUMMY_ROW, "attempted to access blob dummy object"), \
#define PLAYLIST_ERRORS \
#define BLOB_ERRORS \
PARA_ERROR(BLOB_SYNTAX, "blob syntax error"), \
PARA_ERROR(DUMMY_ROW, "attempted to access blob dummy object"), \
#define PLAYLIST_ERRORS \
PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
PARA_ERROR(PATH_FOUND, ""), /* not really an error */ \
PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
PARA_ERROR(PATH_FOUND, ""), /* not really an error */ \
PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
#define CLIENT_COMMON_ERRORS \
PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \
PARA_ERROR(NO_CONFIG, "config file not found"), \
PARA_ERROR(CLIENT_AUTH, "authentication failed"), \
PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \
#define CLIENT_COMMON_ERRORS \
PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \
PARA_ERROR(NO_CONFIG, "config file not found"), \
PARA_ERROR(CLIENT_AUTH, "authentication failed"), \
PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \
PARA_ERROR(CHMOD, "failed to set socket mode"), \
PARA_ERROR(SENDMSG, "sendmsg() failed"), \
PARA_ERROR(RECVMSG, "recvmsg() failed"), \
PARA_ERROR(CHMOD, "failed to set socket mode"), \
PARA_ERROR(SENDMSG, "sendmsg() failed"), \
PARA_ERROR(RECVMSG, "recvmsg() failed"), \
#define RECV_COMMON_ERRORS \
PARA_ERROR(RECV_SYNTAX, "recv syntax error"), \
#define RECV_COMMON_ERRORS \
PARA_ERROR(RECV_SYNTAX, "recv syntax error"), \
PARA_ERROR(MISSING_COLON, "syntax error: missing colon"), \
PARA_ERROR(UNSUPPORTED_AUDIO_FORMAT, "given audio format not supported"), \
PARA_ERROR(SIGNAL_CAUGHT, "caught signal"), \
PARA_ERROR(MISSING_COLON, "syntax error: missing colon"), \
PARA_ERROR(UNSUPPORTED_AUDIO_FORMAT, "given audio format not supported"), \
PARA_ERROR(SIGNAL_CAUGHT, "caught signal"), \
#define COMMAND_ERRORS \
PARA_ERROR(COMMAND_SYNTAX, "syntax error in command"), \
PARA_ERROR(AUTH, "did not receive auth request"), \
#define COMMAND_ERRORS \
PARA_ERROR(COMMAND_SYNTAX, "syntax error in command"), \
PARA_ERROR(AUTH, "did not receive auth request"), \
PARA_ERROR(NO_AUDIO_FILE, "no audio file"), \
PARA_ERROR(BAD_CMD, "invalid command"), \
PARA_ERROR(PERM, "permission denied"), \
PARA_ERROR(NO_AUDIO_FILE, "no audio file"), \
PARA_ERROR(BAD_CMD, "invalid command"), \
PARA_ERROR(PERM, "permission denied"), \
PARA_ERROR(DCCP_WRITE, "dccp write error"), \
#define FD_ERRORS \
PARA_ERROR(FGETS, "fgets error"), \
PARA_ERROR(DCCP_WRITE, "dccp write error"), \
#define FD_ERRORS \
PARA_ERROR(FGETS, "fgets error"), \
- PARA_ERROR(CHDIR, "failed to change directory"), \
- PARA_ERROR(OPEN, "failed to open file"), \
- PARA_ERROR(CHDIR_PERM, "insufficient permissions to chdir"), \
PARA_ERROR(EMPTY, "file empty"), \
PARA_ERROR(MMAP, "mmap error"), \
PARA_ERROR(MUNMAP, "munmap failed"), \
PARA_ERROR(EMPTY, "file empty"), \
PARA_ERROR(MMAP, "mmap error"), \
PARA_ERROR(MUNMAP, "munmap failed"), \
#define WRITE_COMMON_ERRORS \
PARA_ERROR(WRITE_COMMON_SYNTAX, "syntax error in write option"), \
#define WRITE_COMMON_ERRORS \
PARA_ERROR(WRITE_COMMON_SYNTAX, "syntax error in write option"), \
#define CHUNK_QUEUE_ERRORS \
PARA_ERROR(QUEUE, "packet queue overrun"), \
#define CHUNK_QUEUE_ERRORS \
PARA_ERROR(QUEUE, "packet queue overrun"), \
*
* As zero should not be an error, we define a dummy enum entry with value
* 2**ss. That lets the real errors start at 2**ss + 1.
*
* As zero should not be an error, we define a dummy enum entry with value
* 2**ss. That lets the real errors start at 2**ss + 1.
*
* Easy, it's just \a num / 2**8.
*/
#define ERRNUM_TO_SS(num) ((num) >> SS_SHIFT)
/**
*
* Easy, it's just \a num / 2**8.
*/
#define ERRNUM_TO_SS(num) ((num) >> SS_SHIFT)
/**
*/
#define PARA_STRERROR(num) IS_SYSTEM_ERROR(num)? \
strerror((num) & ((1 << SYSTEM_ERROR_BIT) - 1)) : \
para_errlist[ERRNUM_TO_SS(num)] [ERRNUM_TO_INDEX(num)]
/**
*/
#define PARA_STRERROR(num) IS_SYSTEM_ERROR(num)? \
strerror((num) & ((1 << SYSTEM_ERROR_BIT) - 1)) : \
para_errlist[ERRNUM_TO_SS(num)] [ERRNUM_TO_INDEX(num)]
/**
*
* Each executable needs only the error lists of those subsystems it is
* actually linked with. We always reserve space for NUM_SS char pointers,
*
* Each executable needs only the error lists of those subsystems it is
* actually linked with. We always reserve space for NUM_SS char pointers,