Remove stillborn rpmlog facility definitions

While we're purging obsolete APIs:
I fail to see how any of these would ever be of any relevance within
rpm. RPMLOG_UUCP? Nope. RPMLOG_NEWS? RPMLOG_KERN? Nope...
Unsurprisingly none of this stuff has ever been used.

This frees up the top 28 bits of the log code for things that we may
actually want to use.
This commit is contained in:
Panu Matilainen 2022-04-29 10:14:19 +03:00
parent cbcd9dd38d
commit c1121a5c69
2 changed files with 2 additions and 46 deletions

View File

@ -18,13 +18,8 @@ extern "C" {
/** \ingroup rpmlog
* RPM Log levels.
* priorities/facilities are encoded into a single 32-bit quantity, where the
* bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
* (0-big number). Both the priorities and the facilities map roughly
* one-to-one to strings in the syslogd(8) source code. This mapping is
* included in this file.
*
* priorities (these are ordered)
* Priorities are encoded into bottom 3 bits of a single 32 bit quantity.
* The top 28 bits are currently unused.
*/
typedef enum rpmlogLvl_e {
RPMLOG_EMERG = 0, /*!< system is unusable */
@ -43,41 +38,6 @@ typedef enum rpmlogLvl_e {
#define RPMLOG_MAKEPRI(fac, pri) ((((unsigned)(fac)) << 3) | (pri))
#define RPMLOG_NPRIS (RPMLOG_DEBUG + 1)
/** \ingroup rpmlog
* facility codes
*/
typedef enum rpmlogFac_e {
RPMLOG_KERN = (0<<3), /*!< kernel messages */
RPMLOG_USER = (1<<3), /*!< random user-level messages */
RPMLOG_MAIL = (2<<3), /*!< mail system */
RPMLOG_DAEMON = (3<<3), /*!< system daemons */
RPMLOG_AUTH = (4<<3), /*!< security/authorization messages */
RPMLOG_SYSLOG = (5<<3), /*!< messages generated internally by syslogd */
RPMLOG_LPR = (6<<3), /*!< line printer subsystem */
RPMLOG_NEWS = (7<<3), /*!< network news subsystem */
RPMLOG_UUCP = (8<<3), /*!< UUCP subsystem */
RPMLOG_CRON = (9<<3), /*!< clock daemon */
RPMLOG_AUTHPRIV = (10<<3), /*!< security/authorization messages (private) */
RPMLOG_FTP = (11<<3), /*!< ftp daemon */
/* other codes through 15 reserved for system use */
RPMLOG_LOCAL0 = (16<<3), /*!< reserved for local use */
RPMLOG_LOCAL1 = (17<<3), /*!< reserved for local use */
RPMLOG_LOCAL2 = (18<<3), /*!< reserved for local use */
RPMLOG_LOCAL3 = (19<<3), /*!< reserved for local use */
RPMLOG_LOCAL4 = (20<<3), /*!< reserved for local use */
RPMLOG_LOCAL5 = (21<<3), /*!< reserved for local use */
RPMLOG_LOCAL6 = (22<<3), /*!< reserved for local use */
RPMLOG_LOCAL7 = (23<<3), /*!< reserved for local use */
#define RPMLOG_NFACILITIES 24 /*!< current number of facilities */
RPMLOG_ERRMSG = (((unsigned)(RPMLOG_NFACILITIES+0))<<3)
} rpmlogFac;
#define RPMLOG_FACMASK 0x03f8 /*!< mask to extract facility part */
#define RPMLOG_FAC(p) (((p) & RPMLOG_FACMASK) >> 3)
/*
* arguments to setlogmask.
*/

View File

@ -163,10 +163,6 @@ void rpmlogOpen (const char *ident, int option,
{
}
#ifdef NOTYET
static unsigned rpmlogFacility = RPMLOG_USER;
#endif
int rpmlogSetMask (int mask)
{
rpmlogCtx ctx = rpmlogCtxAcquire(mask ? 1 : 0);