mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-20 00:08:07 +00:00
dm:replace perror with pr_err
use acrn-dm logger function instread of perror, this helps the stability testing log capture. Tracked-On: #4098 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
@@ -51,7 +51,7 @@ static int init_kmsg_logger(bool enable, uint8_t log_level)
|
||||
kmsg_fd = open(KMSG_DEV_NODE, O_RDWR | O_APPEND | O_NONBLOCK);
|
||||
if (kmsg_fd < 0) {
|
||||
kmsg_enabled = false;
|
||||
perror(KMSG_PREFIX"open kmsg dev failed");
|
||||
pr_err(KMSG_PREFIX"open kmsg dev failed");
|
||||
}
|
||||
|
||||
return kmsg_fd;
|
||||
@@ -85,7 +85,7 @@ static void write_to_kmsg(const char *fmt, va_list args)
|
||||
|
||||
write_cnt = write(kmsg_fd, kmsg_buf, strnlen(kmsg_buf, KMSG_MAX_LEN));
|
||||
if (write_cnt < 0) {
|
||||
perror(KMSG_PREFIX"write kmsg failed");
|
||||
pr_err(KMSG_PREFIX"write kmsg failed");
|
||||
close(kmsg_fd);
|
||||
kmsg_fd = -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user