mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-05 11:36:50 +00:00
dm: tpm: Convert print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface for better log management. Tracked-On: #5267 Signed-off-by: Sun Peng <peng.p.sun@intel.com> Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
parent
57dd678632
commit
a692df46c1
@ -13,13 +13,14 @@
|
|||||||
#include "vmmapi.h"
|
#include "vmmapi.h"
|
||||||
#include "tpm.h"
|
#include "tpm.h"
|
||||||
#include "tpm_internal.h"
|
#include "tpm_internal.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
static int tpm_debug;
|
static int tpm_debug;
|
||||||
#define LOG_TAG "tpm: "
|
#define LOG_TAG "tpm: "
|
||||||
#define DPRINTF(fmt, args...) \
|
#define DPRINTF(fmt, args...) \
|
||||||
do { if (tpm_debug) printf(LOG_TAG "%s:" fmt, __func__, ##args); } while (0)
|
do { if (tpm_debug) pr_dbg(LOG_TAG "%s:" fmt, __func__, ##args); } while (0)
|
||||||
#define WPRINTF(fmt, args...) \
|
#define WPRINTF(fmt, args...) \
|
||||||
do { printf(LOG_TAG "%s:" fmt, __func__, ##args); } while (0)
|
do { pr_err(LOG_TAG "%s:" fmt, __func__, ##args); } while (0)
|
||||||
|
|
||||||
#define STR_MAX_LEN 1024U
|
#define STR_MAX_LEN 1024U
|
||||||
static char *sock_path = NULL;
|
static char *sock_path = NULL;
|
||||||
|
@ -17,13 +17,14 @@
|
|||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "tpm.h"
|
#include "tpm.h"
|
||||||
#include "tpm_internal.h"
|
#include "tpm_internal.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
static int tpm_crb_debug;
|
static int tpm_crb_debug;
|
||||||
#define LOG_TAG "tpm_crb: "
|
#define LOG_TAG "tpm_crb: "
|
||||||
#define DPRINTF(fmt, args...) \
|
#define DPRINTF(fmt, args...) \
|
||||||
do { if (tpm_crb_debug) printf(LOG_TAG "%s: " fmt, __func__, ##args); } while (0)
|
do { if (tpm_crb_debug) pr_dbg(LOG_TAG "%s: " fmt, __func__, ##args); } while (0)
|
||||||
#define WPRINTF(fmt, args...) \
|
#define WPRINTF(fmt, args...) \
|
||||||
do { printf(LOG_TAG "%s: " fmt, __func__, ##args); } while (0)
|
do { pr_err(LOG_TAG "%s: " fmt, __func__, ##args); } while (0)
|
||||||
|
|
||||||
#define __packed __attribute__((packed))
|
#define __packed __attribute__((packed))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user