aboutsummaryrefslogtreecommitdiff
path: root/lib/libiscsiutil/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libiscsiutil/log.c')
-rw-r--r--lib/libiscsiutil/log.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libiscsiutil/log.c b/lib/libiscsiutil/log.c
index a69c979c3cce..cead4ab2d709 100644
--- a/lib/libiscsiutil/log.c
+++ b/lib/libiscsiutil/log.c
@@ -153,6 +153,18 @@ log_err(int eval, const char *fmt, ...)
}
void
+log_errc(int eval, int code, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ log_common(LOG_CRIT, code, fmt, ap);
+ va_end(ap);
+
+ exit(eval);
+}
+
+void
log_errx(int eval, const char *fmt, ...)
{
va_list ap;
@@ -175,6 +187,16 @@ log_warn(const char *fmt, ...)
}
void
+log_warnc(int code, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ log_common(LOG_WARNING, code, fmt, ap);
+ va_end(ap);
+}
+
+void
log_warnx(const char *fmt, ...)
{
va_list ap;