mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
dm:use acrn-dm logger function instread of fprintf
use acrn-dm logger function instread of fprintf, this helps the stability testing log capture. Tracked-On: #4098 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Cao Minggui <minggui.cao@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -292,7 +292,7 @@ static int ctrl_chan_write(int ctrl_chan_fd, const uint8_t *buf, int len,
|
||||
} while (ret < 0 && errno == EINTR);
|
||||
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "Failed to send msg, reason: %s\n", strerror(errno));
|
||||
pr_err("Failed to send msg, reason: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -350,7 +350,7 @@ static int cmd_chan_write(int cmd_chan_fd, const uint8_t *buf, int len)
|
||||
buf += nwritten;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "cmd_chan_write: Error, write() %d %s\n",
|
||||
pr_err("cmd_chan_write: Error, write() %d %s\n",
|
||||
errno, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
@@ -376,12 +376,12 @@ static int cmd_chan_read(int cmd_chan_fd, uint8_t *buf, int len)
|
||||
buf += nread;
|
||||
}
|
||||
else if (nread < 0) {/* error */
|
||||
fprintf(stderr, "cmd_chan_read: Error, read() error %d %s\n",
|
||||
pr_err("cmd_chan_read: Error, read() error %d %s\n",
|
||||
errno, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
else if (nread == 0) {/* EOF */
|
||||
fprintf(stderr, "cmd_chan_read: Error, read EOF, read %lu bytes\n",
|
||||
pr_err("cmd_chan_read: Error, read EOF, read %lu bytes\n",
|
||||
(unsigned long)(len - nleft));
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user