mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 12:12:16 +00:00
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
|
* Debug printf
|
||||||
*/
|
*/
|
||||||
static int block_if_debug;
|
static int block_if_debug;
|
||||||
#define DPRINTF(params) do { if (block_if_debug) printf params; } while (0)
|
#define DPRINTF(params) do { if (block_if_debug) pr_dbg params; } while (0)
|
||||||
#define WPRINTF(params) (printf params)
|
#define WPRINTF(params) (pr_err params)
|
||||||
|
|
||||||
enum blockop {
|
enum blockop {
|
||||||
BOP_READ,
|
BOP_READ,
|
||||||
@ -600,12 +600,12 @@ blockif_open(const char *optstr, const char *ident)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
warn("Could not open backing file: %s", nopt);
|
pr_err("Could not open backing file: %s", nopt);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fstat(fd, &sbuf) < 0) {
|
if (fstat(fd, &sbuf) < 0) {
|
||||||
warn("Could not stat backing file %s", nopt);
|
pr_err("Could not stat backing file %s", nopt);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user