summaryrefslogtreecommitdiff
path: root/lib/log.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-30 18:12:02 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-30 18:12:02 +0100
commit1f3c9b4ae26ce1d46d954d509b83b8684ada5625 (patch)
tree260b922ec4d5d153cc6db745e27931cfd464472f /lib/log.c
parent8fcf0ba6f182918bd584bb80bf0b8998acad26a8 (diff)
parent8b758ee941f4c1ffea0532caa74b1fcd8101d1d8 (diff)
Merge branch 'release/debian/1.8.19-1'debian/1.8.19-1
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/log.c b/lib/log.c
index 2738e18..ecc47a8 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -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;
}