diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-09-10 15:44:41 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-09-10 15:44:41 +0200 |
commit | a9ee361f27e0439530387765924574e5358c8a5c (patch) | |
tree | 3104aecc4d574f7d7bbb269223814586277b1797 /lib/log.c | |
parent | 82ac6c87ce0b0af2fb8de25d70442fec406bb742 (diff) |
New upstream version 1.8.19upstream/1.8.19upstream
Diffstat (limited to 'lib/log.c')
-rw-r--r-- | lib/log.c | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -29,9 +29,6 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ -#define _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500 || \ - _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || \ - /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L #include <unistd.h> #include <stdio.h> @@ -111,12 +108,12 @@ void log_init(const char * name, int isdaemon, int verbose) if (!logpriv) return; - if (name != NULL) + if (name) logpriv->name = strdup(name); else logpriv->name = strdup(LOG_NAME_DEFAULT); - if (logpriv->name == NULL) + if (!logpriv->name) fprintf(stderr, "ipmitool: malloc failure\n"); logpriv->daemon = isdaemon; @@ -147,13 +144,8 @@ void log_halt(void) logpriv = NULL; } -int log_level_get(void) +void log_level_set(int verbose) { - return logpriv->level; -} - -void log_level_set(int level) -{ - logpriv->level = level; + logpriv->level = verbose + LOG_NOTICE; } |