dm: blockif: Convert print output to acrn-dm logger

Unifies the logs to pr_* interfaces instead of printf 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 07:02:00 +00:00 committed by wenlingz
parent 31a9525fa8
commit fd671047ed
1 changed files with 4 additions and 4 deletions

View File

@ -70,8 +70,8 @@
* Debug printf
*/
static int block_if_debug;
#define DPRINTF(params) do { if (block_if_debug) printf params; } while (0)
#define WPRINTF(params) (printf params)
#define DPRINTF(params) do { if (block_if_debug) pr_dbg params; } while (0)
#define WPRINTF(params) (pr_err params)
enum blockop {
BOP_READ,
@ -600,12 +600,12 @@ blockif_open(const char *optstr, const char *ident)
}
if (fd < 0) {
warn("Could not open backing file: %s", nopt);
pr_err("Could not open backing file: %s", nopt);
goto err;
}
if (fstat(fd, &sbuf) < 0) {
warn("Could not stat backing file %s", nopt);
pr_err("Could not stat backing file %s", nopt);
goto err;
}