mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-21 13:38:42 +00:00
When boardctl() fails, need to print errno not the returned value which will always be -1.
This commit is contained in:
parent
e69e6e445e
commit
90d0300d46
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue