# rpmio/rpmerr.h

Go to the documentation of this file.

    00001 #ifndef H_RPMERR
    00002 #define H_RPMERR
    00003
    00009 #include "rpmlog.h"
    00010
    00011 #define _em(_e) \
    00012     (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_ERR))
    00013 #define _wm(_e) \
    00014     (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_WARNING))
    00015 #define _nm(_e) \
    00016     (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_NOTICE))
    00017 #define _im(_e) \
    00018     (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_INFO))
    00019 #define _dm(_e) \
    00020     (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_DEBUG))
    00021
    00025 /*@-typeuse @*/
    00026 typedef enum rpmerrCode_e {
    00027 /*@-enummemuse@*/
    00028     RPMERR_GDBMOPEN     = _em(2),
    00029     RPMERR_GDBMREAD     = _em(3),
    00030     RPMERR_GDBMWRITE    = _em(4),
    00031 /*@=enummemuse@*/
    00032     RPMERR_INTERNAL     = _em(5),
    00033     RPMERR_DBCORRUPT    = _em(6),
    00034 /*@-enummemuse@*/
    00035     RPMERR_OLDDBCORRUPT = _em(7),
    00036     RPMERR_OLDDBMISSING = _em(8),
    00037     RPMERR_NOCREATEDB   = _em(9),
    00038 /*@=enummemuse@*/
    00039     RPMERR_DBOPEN       = _em(10),
    00040     RPMERR_DBGETINDEX   = _em(11),
    00041     RPMERR_DBPUTINDEX   = _em(12),
    00042     RPMERR_NEWPACKAGE   = _em(13),
    00043     RPMERR_BADMAGIC     = _em(14),
    00044     RPMERR_RENAME       = _em(15),
    00045     RPMERR_UNLINK       = _em(16),
    00046     RPMERR_RMDIR        = _em(17),
    00047 /*@-enummemuse@*/
    00048     RPMERR_PKGINSTALLED = _em(18),
    00049     RPMERR_CHOWN        = _em(19),
    00050     RPMERR_NOUSER       = _em(20),
    00051     RPMERR_NOGROUP      = _em(21),
    00052 /*@=enummemuse@*/
    00053     RPMERR_MKDIR        = _em(22),
    00054 /*@-enummemuse@*/
    00055     RPMERR_FILECONFLICT = _em(23),
    00056 /*@=enummemuse@*/
    00057     RPMERR_RPMRC        = _em(24),
    00058     RPMERR_NOSPEC       = _em(25),
    00059     RPMERR_NOTSRPM      = _em(26),
    00060     RPMERR_FLOCK        = _em(27),
    00061 /*@-enummemuse@*/
    00062     RPMERR_OLDPACKAGE   = _em(28),
    00063 /*      RPMERR_BADARCH  = _em(29),  bad architecture or arch mismatch */
    00064 /*@=enummemuse@*/
    00065     RPMERR_CREATE       = _em(30),
    00066     RPMERR_NOSPACE      = _em(31),
    00067 /*@-enummemuse@*/
    00068     RPMERR_NORELOCATE   = _em(32),
    00069 /*      RPMERR_BADOS    = _em(33),  bad architecture or arch mismatch */
    00070     RPMMESS_BACKUP      = _em(34),
    00071 /*@=enummemuse@*/
    00072     RPMERR_MTAB         = _em(35),
    00073     RPMERR_STAT         = _em(36),
    00074     RPMERR_BADDEV       = _em(37),
    00075 /*@-enummemuse@*/
    00076     RPMMESS_ALTNAME     = _em(38),
    00077     RPMMESS_PREREQLOOP  = _em(39),
    00078     RPMERR_BADRELOCATE  = _em(40),
    00079 /*@=enummemuse@*/
    00080     RPMERR_OLDDB        = _em(41),
    00082     RPMERR_UNMATCHEDIF  = _em(107),
    00083     RPMERR_RELOAD       = _em(108),
    00084     RPMERR_BADARG       = _em(109),
    00085     RPMERR_SCRIPT       = _em(110),
    00086     RPMERR_READ         = _em(111),
    00087 /*@-enummemuse@*/
    00088     RPMERR_UNKNOWNOS    = _em(112),
    00089     RPMERR_UNKNOWNARCH  = _em(113),
    00090 /*@=enummemuse@*/
    00091     RPMERR_EXEC         = _em(114),
    00092     RPMERR_FORK         = _em(115),
    00093     RPMERR_CPIO         = _em(116),
    00094 /*@-enummemuse@*/
    00095     RPMERR_GZIP         = _em(117),
    00096 /*@=enummemuse@*/
    00097     RPMERR_BADSPEC      = _em(118),
    00098 /*@-enummemuse@*/
    00099     RPMERR_LDD          = _em(119),
    00100 /*@=enummemuse@*/
    00101     RPMERR_BADFILENAME  = _em(120),
    00102     RPMERR_OPEN         = _em(121),
    00103     RPMERR_POPEN        = _em(122),
    00104     RPMERR_NOTREG       = _em(123),
    00105     RPMERR_QUERY        = _em(124),
    00106     RPMERR_QFMT         = _em(125),
    00107     RPMERR_DBCONFIG     = _em(126),
    00108     RPMERR_DBERR        = _em(127),
    00109 /*@-enummemuse@*/
    00110     RPMERR_BADPACKAGE   = _em(128),
    00111 /*@=enummemuse@*/
    00112     RPMERR_FREELIST     = _em(129),
    00113     RPMERR_DATATYPE     = _em(130),
    00114     RPMERR_BUILDROOT    = _em(131),
    00115     RPMERR_MAKETEMP     = _em(132),
    00116     RPMERR_FWRITE       = _em(133),
    00117     RPMERR_FREAD        = _em(134),
    00118     RPMERR_READLEAD     = _em(135),
    00119     RPMERR_WRITELEAD    = _em(136),
    00120     RPMERR_QUERYINFO    = _nm(137),
    00121     RPMERR_MANIFEST     = _nm(138),
    00122     RPMERR_BADHEADER    = _em(139),
    00123     RPMERR_FSEEK        = _em(140),
    00124     RPMERR_REGCOMP      = _em(141),
    00125     RPMERR_REGEXEC      = _em(142),
    00127     RPMERR_BADSIGTYPE   = _em(200),
    00128     RPMERR_SIGGEN       = _em(201),
    00129     RPMERR_SIGVFY       = _nm(202),
    00131     RPMDEBUG_UNLINK     = _dm(512u+16),
    00132     RPMDEBUG_RMDIR      = _dm(512u+17),
    00133     RPMWARN_FLOCK       = _wm(512u+27)
    00134 } rpmerrCode;
    00135 /*@=typeuse @*/
    00136
    00140 #define rpmError                        rpmlog
    00141 #define rpmErrorCode()                  rpmlogCode()
    00142 #define rpmErrorString()                rpmlogMessage()
    00143 #define rpmErrorSetCallback(_cb)        rpmlogSetCallback(_cb)
    00144 /*@-typeuse@*/
    00145 typedef rpmlogCallback rpmErrorCallBackType;
    00146 /*@=typeuse@*/
    00147
    00148
    00149 #endif  /* H_RPMERR */