Date: Mon, 26 Mar 2018 22:31:29 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331598 - head/sys/opencrypto Message-ID: <201803262231.w2QMVTt7078370@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Mon Mar 26 22:31:29 2018 New Revision: 331598 URL: https://svnweb.freebsd.org/changeset/base/331598 Log: OCF: CRYPTDEB(): Enhance to allow formatted logging Sponsored by: Dell EMC Isilon Modified: head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Mon Mar 26 22:30:17 2018 (r331597) +++ head/sys/opencrypto/crypto.c Mon Mar 26 22:31:29 2018 (r331598) @@ -525,7 +525,7 @@ crypto_newsession(u_int64_t *sid, struct cryptoini *cr (*sid) |= (lid & 0xffffffff); cap->cc_sessions++; } else - CRYPTDEB("dev newsession failed"); + CRYPTDEB("dev newsession failed: %d", err); } else { CRYPTDEB("no driver"); err = EOPNOTSUPP; Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Mon Mar 26 22:30:17 2018 (r331597) +++ head/sys/opencrypto/cryptodev.h Mon Mar 26 22:31:29 2018 (r331598) @@ -348,10 +348,11 @@ struct cryptostats { #ifdef _KERNEL #if 0 -#define CRYPTDEB(s) do { printf("%s:%d: %s\n", __FILE__, __LINE__, s); \ - } while (0) +#define CRYPTDEB(s, ...) do { \ + printf("%s:%d: " s "\n", __FILE__, __LINE__, ## __VA_ARGS__); \ +} while (0) #else -#define CRYPTDEB(s) do { } while (0) +#define CRYPTDEB(...) do { } while (0) #endif /* Standard initialization structure beginning */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803262231.w2QMVTt7078370>