[Pkg-running-devel] [antpm] 38/39: usb: print errno too
Kristof Ralovich
ralovich-guest at moszumanska.debian.org
Fri Nov 7 11:13:49 UTC 2014
This is an automated email from the git hooks/post-receive script.
ralovich-guest pushed a commit to branch upstream
in repository antpm.
commit cd66fc909a237256ef0d4061ef8429adac6cd8fe
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date: Tue Oct 28 19:28:19 2014 +0100
usb: print errno too
---
src/SerialUsb.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/SerialUsb.cpp b/src/SerialUsb.cpp
index f44e876..9a69f17 100644
--- a/src/SerialUsb.cpp
+++ b/src/SerialUsb.cpp
@@ -63,6 +63,12 @@ const uchar USB_ANT_EP_OUT = 0x01;
#define LOG_USB_WARN(func, rv) \
do { LOG(LOG_WARN) << func << ": " << rv << ": \"" << usb_strerror() << "\"\n"; } while(0)
+#define LOG_USB_WARN2(func, rv) \
+ do { \
+ LOG(LOG_WARN) << func << ": " << rv \
+ << ": \"" << usb_strerror() << "\"\n" \
+ << ": \"" << static_cast<char*>(strerror(rv)) << "\"\n"; \
+ } while(0)
@@ -431,7 +437,7 @@ SerialUsb::write(const char* src, const size_t sizeBytes, size_t& bytesWritten)
int written = usb_bulk_write(m_p->dev, USB_ANT_EP_OUT, const_cast<char*>(src), size, 3000);
if(written < 0)
{
- LOG_USB_WARN("SerialUsb::write", written);
+ LOG_USB_WARN2("SerialUsb::write", written);
return false;
}
@@ -471,7 +477,7 @@ SerialUsb::receiveHandler()
else if(rv==-116) // timeout
{}
#else
- else if(rv==-ETIMEDOUT)
+ else if(rv==-ETIMEDOUT)//-110
{}
#endif
else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git
More information about the Pkg-running-devel
mailing list