From ae74dbcb89f3d471b66e1f1d2fe4bdf33cfff388 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 5 May 2017 18:32:30 +0200 Subject: [PATCH] Improve log message. Change-Id: I91155eda22a172efc88f72243c260480a2d1d4ce Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/can/can-bus-dev.cpp | 6 +++--- CAN-binder/low-can-binding/utils/socketcan-bcm.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CAN-binder/low-can-binding/can/can-bus-dev.cpp b/CAN-binder/low-can-binding/can/can-bus-dev.cpp index bc6f8583..601881db 100644 --- a/CAN-binder/low-can-binding/can/can-bus-dev.cpp +++ b/CAN-binder/low-can-binding/can/can-bus-dev.cpp @@ -104,7 +104,7 @@ can_message_t can_bus_dev_t::read() // Test that socket is really opened if (!can_socket_) { - ERROR(binder_interface, "read: Socket unavailable. Closing thread."); + ERROR(binder_interface, "%s: Socket unavailable. Closing thread.", __FUNCTION__); is_running_ = false; } @@ -114,8 +114,8 @@ can_message_t can_bus_dev_t::read() if (nbytes != CANFD_MTU && nbytes != CAN_MTU) { if (errno == ENETDOWN) - ERROR(binder_interface, "read: %s CAN device down", device_name_.c_str()); - ERROR(binder_interface, "read: Incomplete CAN(FD) frame"); + ERROR(binder_interface, "%s: %s CAN device down", __FUNCTION__, device_name_.c_str()); + ERROR(binder_interface, "%s: Incomplete CAN(FD) frame", __FUNCTION__); ::memset(&cfd, 0, sizeof(cfd)); } diff --git a/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp b/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp index 116b4c57..d115f000 100644 --- a/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp +++ b/CAN-binder/low-can-binding/utils/socketcan-bcm.cpp @@ -51,7 +51,7 @@ namespace utils // Attempts to open a socket to CAN bus ::strcpy(ifr.ifr_name, device_name.c_str()); - DEBUG(binder_interface, "%s: ifr_name is : %s", __FUNCTION__, ifr.ifr_name); + DEBUG(binder_interface, "%s: BCM socket ifr_name is : %s", __FUNCTION__, ifr.ifr_name); if(::ioctl(socket_, SIOCGIFINDEX, &ifr) < 0) { ERROR(binder_interface, "%s: ioctl failed. Error was : %s", __FUNCTION__, strerror(errno)); -- 2.16.6