dm: rbmp: 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:
Sun Peng 2020-08-28 02:59:46 +00:00 committed by wenlingz
parent 1dee884654
commit 57dd678632
2 changed files with 6 additions and 4 deletions

View File

@ -37,10 +37,11 @@
#include "rpmb_sim.h"
#include "vrpmb.h"
#include "rpmb_backend.h"
#include "log.h"
static int virtio_rpmb_debug = 1;
#define DPRINTF(params) do { if (virtio_rpmb_debug) printf params; } while (0)
#define WPRINTF(params) (printf params)
#define DPRINTF(params) do { if (virtio_rpmb_debug) pr_dbg params; } while (0)
#define WPRINTF(params) (pr_err params)
#define READ_STR_LEN 10
#define WRITE_STR_LEN 11

View File

@ -35,6 +35,7 @@
#include "rpmb.h"
#include "rpmb_sim.h"
#include "log.h"
static FILE *rpmb_fd = NULL;
@ -58,8 +59,8 @@ static FILE *rpmb_fd = NULL;
#define offsetof(s, m) (size_t) &(((s *) 0)->m)
static int virtio_rpmb_debug = 1;
#define DPRINTF(params) do { if (virtio_rpmb_debug) printf params; } while (0)
#define WPRINTF(params) (printf params)
#define DPRINTF(params) do { if (virtio_rpmb_debug) pr_dbg params; } while (0)
#define WPRINTF(params) (pr_err params)
/* Make rpmb_mac compatible for different openssl versions */
#if OPENSSL_VERSION_NUMBER < 0x10100000L