From 3a1760c4a1b70af1fbdf63fc202c90fb45e2cd65 Mon Sep 17 00:00:00 2001 From: Yong Li Date: Mon, 7 Nov 2016 09:16:15 +0800 Subject: [PATCH] Remove _blue/_green/_red scale prefix for color sensors Remove the execute bit on these source files Signed-off-by: Yong Li --- src/lib/io/include/sol-iio.h | 0 src/lib/io/sol-iio.c | 13 ++++++++++++- src/modules/flow/iio/iio.json | 0 src/modules/flow/iio/nodes.c | 0 4 files changed, 12 insertions(+), 1 deletion(-) mode change 100755 => 100644 src/lib/io/include/sol-iio.h mode change 100755 => 100644 src/modules/flow/iio/iio.json mode change 100755 => 100644 src/modules/flow/iio/nodes.c diff --git a/src/lib/io/include/sol-iio.h b/src/lib/io/include/sol-iio.h old mode 100755 new mode 100644 diff --git a/src/lib/io/sol-iio.c b/src/lib/io/sol-iio.c index f365f61c3..3e8008dfc 100755 --- a/src/lib/io/sol-iio.c +++ b/src/lib/io/sol-iio.c @@ -584,11 +584,22 @@ channel_get_pure_name(const char *name) channel_name[sizeof(channel_name) - 1] = '\0'; channel_name_len = strlen(channel_name); - if (strendswith(channel_name, "_both")) { + if (strendswith(channel_name, "_green")) { + channel_name[channel_name_len - 6] = '\0'; + modified = true; + } + + if (strendswith(channel_name, "_both") || + strendswith(channel_name, "_blue")) { channel_name[channel_name_len - 5] = '\0'; modified = true; } + if (strendswith(channel_name, "_red")) { + channel_name[channel_name_len - 4] = '\0'; + modified = true; + } + if (strendswith(channel_name, "_ir") || strendswith(channel_name, "_uv")) { channel_name[channel_name_len - 3] = '\0'; diff --git a/src/modules/flow/iio/iio.json b/src/modules/flow/iio/iio.json old mode 100755 new mode 100644 diff --git a/src/modules/flow/iio/nodes.c b/src/modules/flow/iio/nodes.c old mode 100755 new mode 100644