drivers/jtag_vpi: Added "jtag_vpi:" prefixes to log messages
Added "jtag_vpi:" prefixes to log messages from the jtag_vpi driver. The intention is to make it clear what the messages relate to. Without the prefix, many of the log messages won't make much sense to the user. This change does not alter any functionality, just the printed text. Example: Before: Error: Can't connect to 127.0.0.1 : 5555 After: Error: jtag_vpi: Can't connect to 127.0.0.1 : 5555 Change-Id: I779c379f52722b094b200d08b25ab0f7280d2845 Signed-off-by: Jan Matyas <matyas@codasip.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6686 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
8457a1be10
commit
46e3910840
|
@ -159,7 +159,7 @@ retry_write:
|
|||
/* This means we could not send all data, which is most likely fatal
|
||||
for the jtag_vpi connection (the underlying TCP connection likely not
|
||||
usable anymore) */
|
||||
LOG_ERROR("Could not send all data through jtag_vpi connection.");
|
||||
LOG_ERROR("jtag_vpi: Could not send all data through jtag_vpi connection.");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ static int jtag_vpi_init(void)
|
|||
|
||||
sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sockfd < 0) {
|
||||
LOG_ERROR("Could not create socket");
|
||||
LOG_ERROR("jtag_vpi: Could not create client socket");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
|
@ -556,13 +556,13 @@ static int jtag_vpi_init(void)
|
|||
serv_addr.sin_addr.s_addr = inet_addr(server_address);
|
||||
|
||||
if (serv_addr.sin_addr.s_addr == INADDR_NONE) {
|
||||
LOG_ERROR("inet_addr error occurred");
|
||||
LOG_ERROR("jtag_vpi: inet_addr error occurred");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
if (connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
|
||||
close(sockfd);
|
||||
LOG_ERROR("Can't connect to %s : %u", server_address, server_port);
|
||||
LOG_ERROR("jtag_vpi: Can't connect to %s : %u", server_address, server_port);
|
||||
return ERROR_COMMAND_CLOSE_CONNECTION;
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ static int jtag_vpi_init(void)
|
|||
setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
|
||||
}
|
||||
|
||||
LOG_INFO("Connection to %s : %u succeed", server_address, server_port);
|
||||
LOG_INFO("jtag_vpi: Connection to %s : %u successful", server_address, server_port);
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue