OCF: CRYPTDEB(): Enhance to allow formatted logging

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Conrad Meyer 2018-03-26 22:31:29 +00:00
parent d48315f087
commit 289b9798be
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331598
2 changed files with 5 additions and 4 deletions

View File

@ -525,7 +525,7 @@ crypto_newsession(u_int64_t *sid, struct cryptoini *cri, int crid)
(*sid) |= (lid & 0xffffffff);
cap->cc_sessions++;
} else
CRYPTDEB("dev newsession failed");
CRYPTDEB("dev newsession failed: %d", err);
} else {
CRYPTDEB("no driver");
err = EOPNOTSUPP;

View File

@ -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 */