summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-04-16 07:36:02 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-04-16 09:11:48 -0600
commit57285f5dee6d4b9c93b63f70365c81ea195400d0 (patch)
tree69a9ddebd9e5624955d7ef764ddad082c5e517db
parenta28bca05c6968885b43d440d9bb9e3cf1806cde0 (diff)
downloadpx4-nuttx-57285f5dee6d4b9c93b63f70365c81ea195400d0.tar.gz
px4-nuttx-57285f5dee6d4b9c93b63f70365c81ea195400d0.tar.bz2
px4-nuttx-57285f5dee6d4b9c93b63f70365c81ea195400d0.zip
When boardctl() fails, need to print errno not the returned value which will always be -1.
-rw-r--r--NxWidgets/nxwm/src/ctouchscreen.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/NxWidgets/nxwm/src/ctouchscreen.cxx b/NxWidgets/nxwm/src/ctouchscreen.cxx
index 3792811a4..b3f71bbb9 100644
--- a/NxWidgets/nxwm/src/ctouchscreen.cxx
+++ b/NxWidgets/nxwm/src/ctouchscreen.cxx
@@ -1,7 +1,7 @@
/********************************************************************************************
* NxWidgets/nxwm/src/ctouchscreen.cxx
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -285,7 +285,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
int ret = boardctl(BOARDIOC_TSCTEST_SETUP, CONFIG_NXWM_TOUCHSCREEN_DEVNO);
if (ret < 0)
{
- dbg("ERROR Failed initialize the touchscreen device: %d\n", ret);
+ dbg("ERROR Failed initialize the touchscreen device: %d\n", errno);
This->m_state = LISTENER_FAILED;
sem_post(&This->m_waitSem);
return (FAR void *)0;