freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-devel] portability issue in syslog w/ LOG_MAKEPRI????


From: Anand Babu
Subject: Re: [Freeipmi-devel] portability issue in syslog w/ LOG_MAKEPRI????
Date: Mon, 05 Apr 2004 18:59:20 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

,----
| Hmmmmm.  On redhat, the syslog(3) manpage says:
| 
| The priority argument is formed by ORing the facility
| and the level values (explained below).
| 
| But the gnu libc manual says:
| 
| The macro LOG_MAKEPRI generates a facility/priority from a facility and
| a priority,
| 
| On redhat, we're seeing:
| 
| syslog: unknown facility/priority: 443
| 
| in the syslog b/c LOG_MAKEPRI(LOG_LOCAL1, LOG_ERR) makes a value out of
| range.  On redhat, this macro resolves to:
| 
| (((17 << 3) << 3) | 0x03)
| 
| Which is 0x443.
| 
| For the time being, I've changed the priority in libfreeipmi to
| 
| "LOG_LOCAL1 | LOG_ERR"
| 
| Until we can figure out what the best thing to do is.
| 
| Al
| 
| --
| Albert Chu
| address@hidden
| Lawrence Livermore National Laboratory
`----
This is actually a bug caused because of improper documentation of
syslog.h

Correct way to call LOG_MAKPRI is 

   LOG_MAKEPRI (LOG_FAC(LOG_LOCAL1), LOG_ERR))

I fixed it.

-- 
 _.|_ 
(_||_)
Free as in Freedom <www.gnu.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]