You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2021/09/11 21:02:48 UTC

[incubator-nuttx-apps] branch master updated: sensortest: modify errno type when api not support

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 293b89a  sensortest: modify errno type when api not support
293b89a is described below

commit 293b89af44ad9ab95c9f95b96aa32d63b6a6a5ef
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Tue Jul 20 17:13:47 2021 +0800

    sensortest: modify errno type when api not support
    
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 testing/sensortest/sensortest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 85f96f5..c3e5ee1 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -277,7 +277,7 @@ int main(int argc, FAR char *argv[])
   if (ret < 0)
     {
       ret = -errno;
-      if (ret != -ENOTTY)
+      if (ret != -ENOTSUP)
         {
           printf("Failed to set interval for sensor:%s, ret:%s\n",
                  devname, strerror(errno));
@@ -289,7 +289,7 @@ int main(int argc, FAR char *argv[])
   if (ret < 0)
     {
       ret = -errno;
-      if (ret != -ENOTTY)
+      if (ret != -ENOTSUP)
         {
           printf("Failed to batch for sensor:%s, ret:%s\n",
                  devname, strerror(errno));
@@ -301,7 +301,7 @@ int main(int argc, FAR char *argv[])
   if (ret < 0)
     {
       ret = -errno;
-      if (ret != -ENOTTY)
+      if (ret != -ENOTSUP)
         {
           printf("Failed to enable sensor:%s, ret:%s\n",
                  devname, strerror(errno));