Error codes in the RCP interface (War Daemon Manager)
==========================================================
USR_OK = 0,
USRERR_PERM=1,          /* Not owner */
USRERR_NOENT=2,         /* No such file or directory */
USRERR_IO=5,            /* I/O error */
USRERR_NXIO=6,          /* No such device or address */
USRERR_ACCES=13,        /* Permission denied */
USRERR_EXIST=17,        /* File exists */
USRERR_NODEV=19,        /* No such device */
USRERR_NOTDIR=20,       /* Not a directory*/
USRERR_ISDIR=21,        /* Is a directory */
USRERR_INVAL=22,        /* invalid argument */
USRERR_FBIG=27,         /* File too large */
USRERR_NOSPC=28,        /* No space left on device */
USRERR_ROFS=30,         /* Read-only file system */
USRERR_NAMETOOLONG=63,  /* File name too long */
USRERR_NOTEMPTY=66,     /* Directory not empty */
USRERR_DQUOT=69,        /* Disc quota exceeded */
USRERR_STALE=70,        /* Stale user handle */
USRERR_NOPARENT, /* No parent node */
USRERR_NODATA,  /* No data is available */
USRERR_NOOPT, /* Requested option not implemented */
USRERR_SYSERR, /* System call failure. */
USRERR_BANNED, /* Object is banned */
USRERR_NOCALLER, /* Caller ID is invalid */

/* Errors from higher levels */
USRERR_COMMFAIL = 1000, /* RPC communication failure */
USRERR_FAIL     = 9999  /* Unknown error */



Error codes unsed internally by warftpd
==========================================================
OK,     0
ACCESS_DENIED = MED_WAR_FILE,   1000
FILE_IS_BANNED, 1001
NO_CREDITS,     1002
END_OF_FILE,    1003
NOT_OPEN,       1004
NOT_OPEN_FOR_READ,      1005
NOT_OPEN_FOR_WRITE,     1006
NOT_ENOUGH_SPACE,       1007
FILE_IS_OPEN,           1008
PATH_IS_A_DIR,          1009
NO_SUCH_DIR,            1010
NO_SUCH_PATH,           1011
DIR_NOT_OPEN,           1012
FILE_NOT_OPEN,          1013
SEEK_FAILED,            1014
GENERAL_ERROR, // See system error      1015
GENERAL_ERROR_ON_CALLBACK, // See system error  1016
INVALID_ARGUMENT,       1017
CALLBACK_PENDING,       1018
NOT_A_DRIVE,            1019
DRIVE_NOT_READY,        1020
NOT_A_DIRECTORY,        1021
NOT_A_NAME,             1022
INVALID_URL,            1023
UNSUPPORTED_FSYS,       1024
CACHE_ERROR, // General cache error, detalis not available      1025
NOT_SAME_TYPES, // Source and dest files are not same types (file/dir)  1026
NO_SUPPORT, // The class does not support this call     1027
NOT_CALLBACK, // Not opened with callback flag          1028
COMM_ERROR // Unspecified communication error, see WarUserHandle errno  1029

CALLBACK_PENDING = MED_WAR_LOGIN_HANDLE,        1100
ILLEGAL_CHAR_IN_PATH,   1101
INVALID_PATH,           1102
ACCESS_DENIED,          1103
WDQ_FSYS_PATHS_FAILED, // See error code in user database handle        1104
USER_QUERY_PATH_FAILED, // See error code in user database handle       1105
MUST_HAVE_PATH,         1106

PMAP_EXIST = MED_WAR_PORTMAP, // Service is already registered  1200
PMAP_NOT_FOUND,                 1201
PMAP_FAILED_TO_REGISTER,        1202
PMAP_FAILED_TO_START,           1203
PMAP_INVALID                    1204

RPCE_XXX = MED_WAR_RPC,         1300