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:
parent
31a9525fa8
commit
fd671047ed
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue