Merge "[Bugfix][T106BUG-184] cant set and commit uci -1"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/zcatlog_config.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/zcatlog_config.sh
index 064dd2b..604cd22 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/zcatlog_config.sh
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/init.d/zcatlog_config.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+if [ ! -f "/mnt/userdata/config" ];then
+ cp -R /etc/config /mnt/userdata/
+fi
+
# 0 for usb, 1 for net
if [ -e /proc/sys/zcatkern/log_com_mode ]; then
zcat_com_mode=`nv get zcat_mode`
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/uci/files/uci.patch b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/uci/files/uci.patch
index c6e4720..2787896 100644
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/uci/files/uci.patch
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/uci/files/uci.patch
@@ -1,32 +1,3 @@
-diff --git a/libuci.c b/libuci.c
-index ae4c964..dcf3e8b 100644
---- a/libuci.c
-+++ b/libuci.c
-@@ -25,7 +25,7 @@
- #include <dlfcn.h>
- #include <glob.h>
- #include "uci.h"
--
-+#include <unistd.h>
- static const char *uci_errstr[] = {
- [UCI_OK] = "Success",
- [UCI_ERR_MEM] = "Out of memory",
-@@ -174,6 +174,15 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
-
- int uci_list_configs(struct uci_context *ctx, char ***list)
- {
-+ int ret;
-+ if(access("/mnt/userdata/config", 0) != 0)
-+ {
-+ ret = system("cp -R /etc/config /mnt/userdata/");
-+ if(ret!=0)
-+ {
-+ printf("uci_list_configs: cp fail\n");
-+ }
-+ }
- UCI_HANDLE_ERR(ctx);
- UCI_ASSERT(ctx, list != NULL);
- UCI_ASSERT(ctx, ctx->backend && ctx->backend->list_configs);
diff --git a/uci.h b/uci.h
index d0374f2..8ed49d9 100644
--- a/uci.h