summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iscsid
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2016-07-18 21:18:48 +0000
committerbenno <benno@openbsd.org>2016-07-18 21:18:48 +0000
commit1e01caba1f349d93732f1f64ac9d5c61f1e9a540 (patch)
tree3e6dedad6b75c9c4d4245f667d43e5e2250ff58f /usr.sbin/iscsid
parentadd format attributes to log functions (diff)
downloadwireguard-openbsd-1e01caba1f349d93732f1f64ac9d5c61f1e9a540.tar.xz
wireguard-openbsd-1e01caba1f349d93732f1f64ac9d5c61f1e9a540.zip
add format attributes to log functions
ok claudio@
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r--usr.sbin/iscsid/log.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/usr.sbin/iscsid/log.h b/usr.sbin/iscsid/log.h
index 01bbeb3b092..ef3bd1634e7 100644
--- a/usr.sbin/iscsid/log.h
+++ b/usr.sbin/iscsid/log.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.h,v 1.2 2011/04/27 18:59:01 claudio Exp $ */
+/* $OpenBSD: log.h,v 1.3 2016/07/18 21:18:48 benno Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -23,13 +23,21 @@
void log_init(int);
void log_verbose(int);
-void vlog(int, const char *, va_list);
-void log_warn(const char *, ...);
-void log_warnx(const char *, ...);
-void log_info(const char *, ...);
-void log_debug(const char *, ...);
-void fatal(const char *) __dead;
-void fatalx(const char *) __dead;
+void vlog(int, const char *, va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void log_warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_info(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_debug(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void fatal(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
+void fatalx(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
+
void log_hexdump(void *, size_t);
void log_pdu(struct pdu *, int);