Re: [OpenWrt-Devel] [PATCH 1/2] scripts: fix recursive dependencies that might be caused by using conditional dependencies.

2014-12-23 Thread Yousong Zhou
On 22 December 2014 at 18:29, Yousong Zhou wrote: > `kmod-ipt-ipset' has a `DEPENDS' value of > `@(!(TARGET_ps3||TARGET_pxcab)||BROKEN)'. > Recursive dependency will occur if another package conditionally depends > on it with something like `+PACKAGE_dnsmasq_full_ip

Re: [OpenWrt-Devel] [PATCH 1/2] scripts: fix recursive dependencies that might be caused by using conditional dependencies.

2014-12-22 Thread Yousong Zhou
On 23 December 2014 at 09:38, Yousong Zhou wrote: > Should be `=` in this case. But the patch now looks wrong anyway. I Should be `eq' ! Dizzy in the morning, sorry. > will try digging through it. ___ openwrt-devel mailing list op

Re: [OpenWrt-Devel] [PATCH 1/2] scripts: fix recursive dependencies that might be caused by using conditional dependencies.

2014-12-22 Thread Yousong Zhou
On 22 December 2014 at 22:42, Felix Fietkau wrote: > This doesn't look right to me. It seems to be overwriting $condition. > Did you mean eq instead of =? Should be `=` in this case. But the patch now looks wrong anyway. I will try digging through it. yousong ___

[OpenWrt-Devel] [PATCH 2/2] dnsmasq: fix dependency problems of the dnsmasq-full variant.

2014-12-22 Thread Yousong Zhou
necessary information on connections and dependency relations between these CONFIGs and packages. Signed-off-by: Yousong Zhou --- package/network/services/dnsmasq/Makefile | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/package/network/services

[OpenWrt-Devel] [PATCH 1/2] scripts: fix recursive dependencies that might be caused by using conditional dependencies.

2014-12-22 Thread Yousong Zhou
on PACKAGE_dnsmasq_full_ipset tmp/.config-package.in:157: symbol PACKAGE_dnsmasq_full_ipset depends on PACKAGE_dnsmasq-full Signed-off-by: Yousong Zhou --- scripts/metadata.pl |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/metadata.pl b/scripts/metadata.pl

[OpenWrt-Devel] [PATCH 3/3] examples: add example code for json_script.

2014-12-19 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- examples/CMakeLists.txt |2 + examples/json_script-example.c| 84 + examples/json_script-example.json | 33 +++ 3 files changed, 119 insertions(+) create mode 100644 examples/json_script

[OpenWrt-Devel] [PATCH 2/3] json_script: fix logic invert of handle_expr_not().

2014-12-19 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- json_script.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/json_script.c b/json_script.c index 6a17d3b..73c2502 100644 --- a/json_script.c +++ b/json_script.c @@ -333,12 +333,16 @@ static int handle_expr_or(struct json_call *call

[OpenWrt-Devel] [PATCH 1/3] ustream: add function ustream_read().

2014-12-19 Thread Yousong Zhou
r h; ustream_read(s, &h, sizeof(h)); } Signed-off-by: Yousong Zhou --- ustream.c | 24 ustream.h |5 + 2 files changed, 29 insertions(+) diff --git a/ustream.c b/ustream.c index 828a025..f1db809 100644 --- a/ustream.c +++ b/ustream.c @@ -333,6 +333,30

[OpenWrt-Devel] [PATCH 0/3] libubox: minor fixes and enhancemants.

2014-12-19 Thread Yousong Zhou
This patch set - Renames ustream_fill_with_read_buf() to ustream_read(). - Add error code handling in handle_expr_not(). - Add example code for json_script. [1] https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/029853.html Yousong Zhou (3): ustream: add function ustream_read

Re: [OpenWrt-Devel] [PATCH v2 16/16] uci_internal: use comma expression for UCI_INTERNAL() call.

2014-12-18 Thread Yousong Zhou
On 18 December 2014 at 19:08, Felix Fietkau wrote: > On 2014-12-16 08:00, Yousong Zhou wrote: >> Signed-off-by: Yousong Zhou >> --- >> uci_internal.h |8 >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/uci_internal.h b/u

Re: [OpenWrt-Devel] [PATCH] dnsmasq: allow de-selecting features from -full variant.

2014-12-17 Thread Yousong Zhou
Hi, Frank. On 18 December 2014 at 01:49, Frank Schäfer wrote: > Hi yousong, > > thanks for the patch. > A few issues/comments: > > Am 17.12.2014 um 02:21 schrieb Yousong Zhou: >> Signed-off-by: Yousong Zhou >> --- >> package/network/servi

[OpenWrt-Devel] [PATCH v2 15/16] delta: fix outputing of delta entries occupying multiple lines.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c | 85 ++- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/delta.c b/delta.c index 556250d..cdd46bc 100644 --- a/delta.c +++ b/delta.c @@ -66,6 +66,35 @@ uci_free_delta(struct

[OpenWrt-Devel] [PATCH v2 16/16] uci_internal: use comma expression for UCI_INTERNAL() call.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- uci_internal.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uci_internal.h b/uci_internal.h index 89863f1..cb8f86c 100644 --- a/uci_internal.h +++ b/uci_internal.h @@ -227,10 +227,10 @@ struct uci_backend _var

[OpenWrt-Devel] [PATCH v2 11/16] cli: fix printing option values occupying multiple lines.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- cli.c | 45 +++-- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/cli.c b/cli.c index 554..2ee1e36 100644 --- a/cli.c +++ b/cli.c @@ -168,18 +168,41 @@ static void cli_perror(void) uci_perror

[OpenWrt-Devel] [PATCH v2 14/16] delta: use a table for converting between UCI_CMD_XXX and prefixes.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c | 64 +++ uci.h |6 ++ 2 files changed, 25 insertions(+), 45 deletions(-) diff --git a/delta.c b/delta.c index 2eb2ae7..556250d 100644 --- a/delta.c +++ b/delta.c @@ -95,34 +95,29

[OpenWrt-Devel] [PATCH v2 12/16] delta: add a simple duplication check when adding delta path.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c |2 ++ uci.h |2 ++ 2 files changed, 4 insertions(+) diff --git a/delta.c b/delta.c index 082633b..b56df5b 100644 --- a/delta.c +++ b/delta.c @@ -87,6 +87,8 @@ int uci_add_delta_path(struct uci_context *ctx, const char *dir

[OpenWrt-Devel] [PATCH v2 13/16] delta: preprocess delta line with uci_parse_argument().

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c | 25 ++--- file.c |7 +-- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/delta.c b/delta.c index b56df5b..2eb2ae7 100644 --- a/delta.c +++ b/delta.c @@ -95,11 +95,14 @@ int uci_add_delta_path(struct

[OpenWrt-Devel] [PATCH v2 09/16] tests: add test coverage for `uci revert' command.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/revert_option.result |3 +++ test/references/revert_option_multiline.result |2 ++ test/tests.d/070_revert| 28 3 files changed, 33 insertions(+) create mode 100644 test

[OpenWrt-Devel] [PATCH v2 10/16] tests: add test coverage for uci list related commands.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/add_list_changes.result |4 ++ test/references/add_list_config.result |6 +++ test/references/add_list_show.result |3 ++ test/references/del_list_config.result |5 +++ test/references

[OpenWrt-Devel] [PATCH v2 08/16] tests: add test coverage for `uci batch' command.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/batch_set.result |9 + test/tests.d/060_batch | 17 + 2 files changed, 26 insertions(+) create mode 100644 test/references/batch_set.result create mode 100644 test/tests.d/060_batch diff --git a/test

[OpenWrt-Devel] [PATCH v2 07/16] tests: add more test coverage for `uci show' command.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/show_parsing_multiline.data| 20 + .../show_parsing_multiline_option.result | 12 .../show_parsing_multiline_package.result | 18 .../show_parsing_multiline_section.result

[OpenWrt-Devel] [PATCH v2 06/16] tests: remove straying echo in 020_get.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/tests.d/020_get |1 - 1 file changed, 1 deletion(-) diff --git a/test/tests.d/020_get b/test/tests.d/020_get index 7fd30ba..630d84d 100644 --- a/test/tests.d/020_get +++ b/test/tests.d/020_get @@ -35,7 +35,6 @@ test_get_option_multiline() { cp

[OpenWrt-Devel] [PATCH v2 05/16] file: fix error string about "unterminated XXX".

2014-12-17 Thread Yousong Zhou
- Remove unreachable call to uci_parse_error(). - Fix false claim of unterminated double quote to single quote. Signed-off-by: Yousong Zhou --- file.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/file.c b/file.c index 3f02c11..0fc68a6 100644 --- a/file.c +++ b

[OpenWrt-Devel] [PATCH v2 03/16] file: fix use-after-free bug.

2014-12-17 Thread Yousong Zhou
Currently, it's possible that pointers returned by next_arg() could be invalidated by another call to next_arg() due to uci_realloc(). Signed-off-by: Yousong Zhou --- file.c | 41 + 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/f

[OpenWrt-Devel] [PATCH v2 04/16] file: fix EOF check.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- file.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.c b/file.c index 1d2718a..3f02c11 100644 --- a/file.c +++ b/file.c @@ -48,8 +48,8 @@ __private void uci_getln(struct uci_context *ctx, int offset) pctx->

[OpenWrt-Devel] [PATCH v2 02/16] Fix memory leaks found by using valgrind on test cases.

2014-12-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- cli.c |8 ++-- list.c |2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cli.c b/cli.c index 6fbbfe9..554 100644 --- a/cli.c +++ b/cli.c @@ -360,6 +360,7 @@ static int uci_do_package_cmd(int cmd, int argc, char **argv

[OpenWrt-Devel] [PATCH v2 01/16] Fix a few style issues.

2014-12-17 Thread Yousong Zhou
- Remove deprecated uci-static and ucimap-example from .gitignore. - Minor code formatting fix. Signed-off-by: Yousong Zhou --- .gitignore |2 -- file.c |2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c3e50e0..0407feb 100644 --- a

[OpenWrt-Devel] [PATCH v2 00/16] uci: fix issues caused by newly-added multiline option value support.

2014-12-17 Thread Yousong Zhou
on list options. Yousong Zhou (16): Fix a few style issues. Fix memory leaks found by using valgrind on test cases. file: fix use-after-free bug. file: fix EOF check. file: fix error string about "unterminated XXX". tests: remove straying echo in 020_get. tests: add

Re: [OpenWrt-Devel] dnsmasq packages

2014-12-16 Thread Yousong Zhou
Hi, On 17 December 2014 at 02:02, Christian Schoenebeck wrote: > Hi, > > I would prefer to make it configurable like libcurl, busybox and others so > select the option you need during compile. > Base inside OpenWrt should be without any options, because dnsmasq is only > used as IPv4 DHCP. > >

[OpenWrt-Devel] [PATCH] dnsmasq: allow de-selecting features from -full variant.

2014-12-16 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- package/network/services/dnsmasq/Makefile | 27 ++-- .../network/services/dnsmasq/files/dnsmasq.init|5 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package

Re: [OpenWrt-Devel] [PATCH 07/12] cli: fix printing option values occupying multiple lines.

2014-12-16 Thread Yousong Zhou
On 16 December 2014 at 16:28, Yousong Zhou wrote: > On 15 December 2014 at 16:46, Yousong Zhou wrote: >> >> Signed-off-by: Yousong Zhou >> --- >> +static void uci_show_value(struct uci_option *o, bool quote) >> { >> struct uci_

Re: [OpenWrt-Devel] [PATCH 07/12] cli: fix printing option values occupying multiple lines.

2014-12-16 Thread Yousong Zhou
On 15 December 2014 at 16:46, Yousong Zhou wrote: > > Signed-off-by: Yousong Zhou > --- > cli.c | 40 ++-- > 1 file changed, 30 insertions(+), 10 deletions(-) > > diff --git a/cli.c b/cli.c > index 6fbbfe9..85a24d8 100644 >

[OpenWrt-Devel] [PATCH 11/12] delta: fix outputing of delta entries occupying multiple lines.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c | 85 ++- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/delta.c b/delta.c index 556250d..cdd46bc 100644 --- a/delta.c +++ b/delta.c @@ -66,6 +66,35 @@ uci_free_delta(struct

[OpenWrt-Devel] [PATCH 12/12] uci_internal: use comma expression for UCI_INTERNAL() call.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- uci_internal.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uci_internal.h b/uci_internal.h index 89863f1..cb8f86c 100644 --- a/uci_internal.h +++ b/uci_internal.h @@ -227,10 +227,10 @@ struct uci_backend _var

[OpenWrt-Devel] [PATCH 10/12] delta: use a table for converting between UCI_CMD_XXX and prefixes.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c | 64 +++ uci.h |6 ++ 2 files changed, 25 insertions(+), 45 deletions(-) diff --git a/delta.c b/delta.c index 2eb2ae7..556250d 100644 --- a/delta.c +++ b/delta.c @@ -95,34 +95,29

[OpenWrt-Devel] [PATCH 08/12] delta: add a simple duplication check when adding delta path.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c |2 ++ uci.h |2 ++ 2 files changed, 4 insertions(+) diff --git a/delta.c b/delta.c index 082633b..b56df5b 100644 --- a/delta.c +++ b/delta.c @@ -87,6 +87,8 @@ int uci_add_delta_path(struct uci_context *ctx, const char *dir

[OpenWrt-Devel] [PATCH 09/12] delta: preprocess delta line with uci_parse_argument().

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c | 25 ++--- file.c |9 +++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/delta.c b/delta.c index b56df5b..2eb2ae7 100644 --- a/delta.c +++ b/delta.c @@ -95,11 +95,14 @@ int uci_add_delta_path(struct

[OpenWrt-Devel] [PATCH 07/12] cli: fix printing option values occupying multiple lines.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- cli.c | 40 ++-- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/cli.c b/cli.c index 6fbbfe9..85a24d8 100644 --- a/cli.c +++ b/cli.c @@ -168,18 +168,36 @@ static void cli_perror(void) uci_perror(ctx

[OpenWrt-Devel] [PATCH 06/12] tests: add test coverage for uci list related commands.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/add_list_changes.result |4 ++ test/references/add_list_config.result |6 +++ test/references/add_list_show.result |3 ++ test/references/del_list_config.result |5 +++ test/references

[OpenWrt-Devel] [PATCH 05/12] tests: add test coverage for `uci revert' command.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/revert_option.result |3 +++ test/references/revert_option_multiline.result |2 ++ test/tests.d/070_revert| 28 3 files changed, 33 insertions(+) create mode 100644 test

[OpenWrt-Devel] [PATCH 04/12] tests: add test coverage for `uci batch' command.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/batch_set.result |9 + test/tests.d/060_batch | 17 + 2 files changed, 26 insertions(+) create mode 100644 test/references/batch_set.result create mode 100644 test/tests.d/060_batch diff --git a/test

[OpenWrt-Devel] [PATCH 02/12] tests: remove straying echo in 020_get.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/tests.d/020_get |1 - 1 file changed, 1 deletion(-) diff --git a/test/tests.d/020_get b/test/tests.d/020_get index 7fd30ba..630d84d 100644 --- a/test/tests.d/020_get +++ b/test/tests.d/020_get @@ -35,7 +35,6 @@ test_get_option_multiline() { cp

[OpenWrt-Devel] [PATCH 03/12] tests: add more test coverage for `uci show' command.

2014-12-15 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/show_parsing_multiline.data| 20 + .../show_parsing_multiline_option.result | 12 .../show_parsing_multiline_package.result | 18 .../show_parsing_multiline_section.result

[OpenWrt-Devel] [PATCH 01/12] Fix a few style issues.

2014-12-15 Thread Yousong Zhou
- Remove deprecated uci-static and ucimap-example from .gitignore. - Minor code formatting fix. Signed-off-by: Yousong Zhou --- .gitignore |2 -- file.c |2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c3e50e0..0407feb 100644 --- a

[OpenWrt-Devel] [PATCH 00/12] uci: fix issues caused by newly-added multiline option value support.

2014-12-15 Thread Yousong Zhou
unexpected problems which I was only aware of when doing a fresh installation. It's very wise of Felix for keeping that update only to uci.git repository at the moment, thus giving me the chance to discover those flaws and fix them at my best. Yousong Zhou (12): Fix a few style issues.

Re: [OpenWrt-Devel] [PATCH] ramips:Add support for Aigale Ai-BR100

2014-12-12 Thread Yousong Zhou
Hi, gch On 13 December 2014 at 10:41, 郭传鈜 wrote: > Aigale Ai-BR100 is a router with mt7620a soc. > There are only 2 lights on the board (WAN and WLAN) so I used the wlan light > as the status led. > IIRC, there are 3 LEDs, but one of them is for power supply indication and cannot be controlled

Re: [OpenWrt-Devel] [PATCH 2/3] Fix SSL negotiation being interrupted by .notify_write from BIO method.

2014-12-12 Thread Yousong Zhou
On 12 December 2014 at 19:36, Felix Fietkau wrote: > On 2014-12-12 05:16, Yousong Zhou wrote: >> On 12 December 2014 at 00:42, Felix Fietkau wrote: >>> On 2014-11-11 11:34, Yousong Zhou wrote: >>>> ustream_ssl_check_conn() may be called by .notify_write while a

Re: [OpenWrt-Devel] [PATCH v2 00/10] libubox: various minor fixes and enhancements.

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 01:05, Felix Fietkau wrote: > On 2014-11-12 14:59, Yousong Zhou wrote: >> Yousong Zhou (10): >> libubox: drop legacy json-c support >> lua: do not hardcode /opt/local/include for Apple. >> examples: fix build. >> ustream: add fu

Re: [OpenWrt-Devel] [PATCH 2/3] Fix SSL negotiation being interrupted by .notify_write from BIO method.

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:42, Felix Fietkau wrote: > On 2014-11-11 11:34, Yousong Zhou wrote: >> ustream_ssl_check_conn() may be called by .notify_write while a previous >> SSL_connect() is still in process. This can happen because the >> .notify_write callback will may be t

Re: [OpenWrt-Devel] [PATCH 4/5] ustream: add function ustream_fill_with_read_buf().

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:33, Felix Fietkau wrote: > On 2014-11-11 11:51, Yousong Zhou wrote: >> Useful in the following use pattern. >> >> int available = ustream_pending_data(s, false); >> if (available >= sizeof(struct msghdr)) { &g

Re: [OpenWrt-Devel] [PATCH v2 08/10] json_script: fix logic invert of handle_expr_not().

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:52, Felix Fietkau wrote: > On 2014-11-12 14:59, Yousong Zhou wrote: >> Signed-off-by: Yousong Zhou >> --- >> json_script.c |2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/json_script.c b/json_sc

Re: [OpenWrt-Devel] [PATCH 5/5] ustream: call notify_write() when bytes are written.

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:36, Felix Fietkau wrote: > On 2014-11-11 11:51, Yousong Zhou wrote: >> >> Signed-off-by: Yousong Zhou > The idea behind the notify_write callback was to notify callers of > buffers being drained. What's the intended use case for this patch? T

[OpenWrt-Devel] [PATCH v2 10/10] json_script: remove unneed argument check before calling __json_script_file_free().

2014-12-10 Thread Yousong Zhou
NULL check is present at the begining of function body. Signed-off-by: Yousong Zhou --- json_script.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/json_script.c b/json_script.c index 9805b04..7de005d 100644 --- a/json_script.c +++ b/json_script.c @@ -592,8 +592,7

[OpenWrt-Devel] [PATCH v2 09/10] json_script: fix eval_string().

2014-12-10 Thread Yousong Zhou
- Fix handling of "%%". - Fix length requirement when calling blobmsg_realloc_string_buffer(). Signed-off-by: Yousong Zhou --- json_script.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json_script.c b/json_script.c index 0d51f79..9805b04 10

[OpenWrt-Devel] [PATCH v2 08/10] json_script: fix logic invert of handle_expr_not().

2014-12-10 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- json_script.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_script.c b/json_script.c index 0ec7b38..0d51f79 100644 --- a/json_script.c +++ b/json_script.c @@ -338,7 +338,7 @@ static int handle_expr_not(struct json_call *call, struct

[OpenWrt-Devel] [PATCH v2 07/10] jshn: add error handling and fix memory leak in jshn_format().

2014-12-10 Thread Yousong Zhou
Though currently jshn is more a one-shot data transformation tool and won't leak much memory in its lifetime, people may use it as example code, so do it right. Signed-off-by: Yousong Zhou --- jshn.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --

[OpenWrt-Devel] [PATCH v2 06/10] blobmsg: remove unneeded assignment in blobmsg_alloc_string_buffer().

2014-12-10 Thread Yousong Zhou
data_dest should already be assigned by blobmsg_new() if the return value is not NULL. Signed-off-by: Yousong Zhou --- blobmsg.c |1 - 1 file changed, 1 deletion(-) diff --git a/blobmsg.c b/blobmsg.c index 9fe96e4..80b984a 100644 --- a/blobmsg.c +++ b/blobmsg.c @@ -262,7 +262,6

[OpenWrt-Devel] [PATCH v2 05/10] ustream: call notify_write() when bytes are written.

2014-12-10 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- ustream.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ustream.c b/ustream.c index 64cdc6a..1d0c38e 100644 --- a/ustream.c +++ b/ustream.c @@ -364,6 +364,17 @@ static void ustream_write_error(struct ustream *s

[OpenWrt-Devel] [PATCH v2 04/10] ustream: add function ustream_fill_with_read_buf().

2014-12-10 Thread Yousong Zhou
Useful in the following use pattern. int available = ustream_pending_data(s, false); if (available >= sizeof(struct msghdr)) { struct msghdr h; ustream_fill_with_read_buf(s, &h, sizeof(h)); } Signed-off-by: Yousong Zhou --- us

[OpenWrt-Devel] [PATCH v2 03/10] examples: fix build.

2014-12-10 Thread Yousong Zhou
- runqueue-example.c: fix include path for in-tree build. - blobmsg-example.c: add inttypes.h for using PRIu64. - add examples/ subdirectory to main CMakeLists.txt Signed-off-by: Yousong Zhou --- CMakeLists.txt |1 + examples/blobmsg-example.c |1 + examples/runqueue

[OpenWrt-Devel] [PATCH v2 02/10] lua: do not hardcode /opt/local/include for Apple.

2014-12-10 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- CMakeLists.txt |5 - examples/CMakeLists.txt |5 - lua/CMakeLists.txt |1 - 3 files changed, 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 737f2ae..4b1570c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt

[OpenWrt-Devel] [PATCH v2 01/10] libubox: drop legacy json-c support

2014-12-10 Thread Yousong Zhou
: Yousong Zhou --- CMakeLists.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f24fee9..737f2ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ IF(APPLE) ENDIF() INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES

[OpenWrt-Devel] [PATCH v2 00/10] libubox: various minor fixes and enhancements.

2014-12-10 Thread Yousong Zhou
Yousong Zhou (10): libubox: drop legacy json-c support lua: do not hardcode /opt/local/include for Apple. examples: fix build. ustream: add function ustream_fill_with_read_buf(). ustream: call notify_write() when bytes are written. blobmsg: remove unneeded assignment in

Re: [OpenWrt-Devel] [PATCH 1/5] libubox: drop legacy json-c support

2014-12-07 Thread Yousong Zhou
On 11 November 2014 at 18:51, Yousong Zhou wrote: > The cmake logic is wrong (E.G. PKG_CHECK_FOR_MODULES fails unless all > modules are found), and the legacy libjson.so name is also used by the other > libjson (http://sourceforge.net/projects/libjson/) which provides an > incompat

Re: [OpenWrt-Devel] [PATCH 1/3] examples: add .notify_write callback.

2014-12-07 Thread Yousong Zhou
Hmm, sorry for being a little ambiguous. The 3 patches in this series is for ustream-ssl. The other 5 patches in another series is for libubox. On 11 November 2014 at 18:33, Yousong Zhou wrote: > > Signed-off-by: Yousong Zhou > --- > ustream-example-client.c |6 ++ >

[OpenWrt-Devel] [PATCH 5/5] ustream: call notify_write() when bytes are written.

2014-12-07 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- ustream.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ustream.c b/ustream.c index 64cdc6a..1d0c38e 100644 --- a/ustream.c +++ b/ustream.c @@ -364,6 +364,17 @@ static void ustream_write_error(struct ustream *s

[OpenWrt-Devel] [PATCH 4/5] ustream: add function ustream_fill_with_read_buf().

2014-12-07 Thread Yousong Zhou
Useful in the following use pattern. int available = ustream_pending_data(s, false); if (available >= sizeof(struct msghdr)) { struct msghdr h; ustream_fill_with_read_buf(s, &h, sizeof(h)); } Signed-off-by: Yousong Zhou --- us

[OpenWrt-Devel] [PATCH 3/5] examples: fix build.

2014-12-07 Thread Yousong Zhou
- runqueue-example.c: fix include path for in-tree build. - blobmsg-example.c: add inttypes.h for using PRIu64. - add examples/ subdirectory to main CMakeLists.txt Signed-off-by: Yousong Zhou --- CMakeLists.txt |1 + examples/blobmsg-example.c |1 + examples/runqueue

[OpenWrt-Devel] [PATCH 2/5] lua: do not hardcode /opt/local/include for Apple.

2014-12-07 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- CMakeLists.txt |5 - examples/CMakeLists.txt |5 - lua/CMakeLists.txt |1 - 3 files changed, 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 737f2ae..4b1570c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt

[OpenWrt-Devel] [PATCH 1/5] libubox: drop legacy json-c support

2014-12-07 Thread Yousong Zhou
: Yousong Zhou --- CMakeLists.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f24fee9..737f2ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ IF(APPLE) ENDIF() INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES

[OpenWrt-Devel] [PATCH 3/3] cmake: Do not hardcode /opt/local/include for Apple.

2014-12-07 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- CMakeLists.txt |5 - 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f494f6d..c09fe51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,6 @@ ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing

[OpenWrt-Devel] [PATCH 2/3] Fix SSL negotiation being interrupted by .notify_write from BIO method.

2014-12-07 Thread Yousong Zhou
ustream_ssl_check_conn() may be called by .notify_write while a previous SSL_connect() is still in process. This can happen because the .notify_write callback will may be triggered by writes in the BIO methods. Signed-off-by: Yousong Zhou --- ustream-ssl.c | 19 +++ ustream

[OpenWrt-Devel] [PATCH 1/3] examples: add .notify_write callback.

2014-12-07 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- ustream-example-client.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/ustream-example-client.c b/ustream-example-client.c index fc49146..6527362 100644 --- a/ustream-example-client.c +++ b/ustream-example-client.c @@ -46,6 +46,11 @@ static void

[OpenWrt-Devel] [PATCH 4/4] Add test coverage for multi-line option value.

2014-11-24 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/add_section.result |2 +- test/references/export.data|7 ++- test/references/export.result |5 + test/references/get_multiline.data

[OpenWrt-Devel] [PATCH 3/4] Use offset into parser buffer to avoid potential heap overflow.

2014-11-24 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- delta.c| 15 +++- file.c | 216 +++- uci_internal.h |8 ++- util.c | 11 +-- 4 files changed, 147 insertions(+), 103 deletions(-) diff --git a/delta.c b/delta.c index 32628dc

[OpenWrt-Devel] [PATCH 2/4] Sync ref test result with current implementation.

2014-11-24 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/references/export.result | 10 +- test/references/import.result |8 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/references/export.result b/test/references/export.result index 957e687..bc06655 100644 --- a/test

[OpenWrt-Devel] [PATCH 1/4] Drop test cases for deprecated ucimap-example.

2014-11-24 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/tests.d/060-ucimap_example |9 - 1 file changed, 9 deletions(-) delete mode 100644 test/tests.d/060-ucimap_example diff --git a/test/tests.d/060-ucimap_example b/test/tests.d/060-ucimap_example deleted file mode 100644 index 984726b..000

[OpenWrt-Devel] [PATCH 0/4] Add multi-line option value support to UCI config file parser.

2014-11-24 Thread Yousong Zhou
p the related bits all in one place, not just many remedy scripts scattered here and there. [1] see `append_params()` in package/network/services/openvpn/files/openvpn.init Yousong Zhou (4): Drop test cases for deprecated ucimap-example. Sync ref test result with current implementation. Use o

Re: [OpenWrt-Devel] Configuring OVS on OpenWRT

2014-11-20 Thread Yousong Zhou
On 21 November 2014 10:03, Yilun Zhou wrote: > Hi, > > > I have installed OVS on my router and I want to connect it with a Floodlight > controller. The IP address of the laptop on which Floodlight is running is > 192.168.1.161 and Floodlight is running on port 6633. Here is what I am > doing. > >

Re: [OpenWrt-Devel] [PATCH 4/4] firmware-utils: restore compilation of mkhilinkfw.

2014-10-21 Thread Yousong Zhou
Hi, John, Felix On 20 October 2014 17:24, Yousong Zhou wrote: > Hi, Felix > > On 20 October 2014 16:28, Felix Fietkau wrote: >> On 2014-10-17 11:58, Yousong Zhou wrote: >>> diff --git a/tools/Makefile b/tools/Makefile >>> index 5629251..9879be1 100644 >>

Re: [OpenWrt-Devel] [PATCH 4/4] firmware-utils: restore compilation of mkhilinkfw.

2014-10-20 Thread Yousong Zhou
Hi, Felix On 20 October 2014 16:28, Felix Fietkau wrote: > On 2014-10-17 11:58, Yousong Zhou wrote: >> diff --git a/tools/Makefile b/tools/Makefile >> index 5629251..9879be1 100644 >> --- a/tools/Makefile >> +++ b/tools/Makefile >> @@ -72,6 +72,7 @@ $(curdir)/b43

Re: [OpenWrt-Devel] [PATCHv2] [netifd/scripts] make netifd scripts recognize signal strings such as INT/TERM/KILL/... signal in proto_kill_command()

2014-10-18 Thread Yousong Zhou
Am 18.10.2014 23:58 schrieb "Bastian Bittorf" : > > * Yousong Zhou [18.10.2014 17:58]: > > > + signal="$( kill -l "$signal" )" > > > > the quotes may not work... > > they work and you should always quote a var,

Re: [OpenWrt-Devel] [PATCHv2] [netifd/scripts] make netifd scripts recognize signal strings such as INT/TERM/KILL/... signal in proto_kill_command()

2014-10-18 Thread Yousong Zhou
Am 16.10.2014 14:59 schrieb "Bastian Bittorf" : > > [netifd/scripts] make netifd scripts recognize signal strings such as INT/TERM/KILL/... > > instead of let the caller do the conversion of symbolic to numeric (e.g. SIGUSR1 -> 16), > do the conversion internally - the old mode (numeric) is still s

[OpenWrt-Devel] [PATCH 2/3] ramips: add comments for image/Makefile.

2014-10-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- target/linux/ramips/image/Makefile | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index f048caf..b390467 100644 --- a/target/linux/ramips/image

[OpenWrt-Devel] [PATCH 3/3] ar71xx: unify usage of IMAGE_PROFILE instead of PROFILE.

2014-10-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- target/linux/ar71xx/image/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index a382f3a..f0e6586 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target

[OpenWrt-Devel] [PATCH 1/3] ar71xx: add comments for Image/BuildLoader{, Alone}.

2014-10-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- target/linux/ar71xx/image/Makefile | 17 + 1 file changed, 17 insertions(+) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 78e2d70..a382f3a 100644 --- a/target/linux/ar71xx/image/Makefile +++ b

[OpenWrt-Devel] [PATCH 4/4] firmware-utils: restore compilation of mkhilinkfw.

2014-10-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- target/linux/ramips/image/Makefile |2 +- tools/Makefile |1 + tools/firmware-utils/Makefile |4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips

[OpenWrt-Devel] [PATCH 3/4] openssl: add host build.

2014-10-17 Thread Yousong Zhou
Only support Linux at the moment. Signed-off-by: Yousong Zhou --- package/libs/openssl/Makefile | 56 + 1 file changed, 56 insertions(+) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 0c42362..e33f9bd 100644 --- a

[OpenWrt-Devel] [PATCH 2/4] build: add $(STAGING_DIR_HOST)/usr/{include, lib} to build search path.

2014-10-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- rules.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules.mk b/rules.mk index c9efb9e..f44e8ed 100644 --- a/rules.mk +++ b/rules.mk @@ -187,9 +187,9 @@ export PKG_CONFIG HOSTCC:=gcc HOSTCXX:=g++ -HOST_CPPFLAGS:=-I

[OpenWrt-Devel] [PATCH 1/4] firmware-utils: fix compilation warnings.

2014-10-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- tools/firmware-utils/src/buffalo-tftp.c |2 -- tools/firmware-utils/src/mkrtn56uimg.c |8 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/firmware-utils/src/buffalo-tftp.c b/tools/firmware-utils/src/buffalo-tftp.c index

Re: [OpenWrt-Devel] Help, how to troubleshoot openwrt crash(reboot)

2014-10-12 Thread Yousong Zhou
On Oct 12, 2014 2:41 AM, "document" wrote: > > hi, > > how to troubleshoot openwrt crash(reboot) ? > > i have openvpn-2.3.2 installed from opkg but when i manually start it about 1min passed, router (openwrt-12.09) will reboot. > > when i enabled openvpn service on startup, router will auto reboot

Re: [OpenWrt-Devel] [PATCH] ar71xx: qihoo-c301: reset imageNtrynum after each successful boot.

2014-10-11 Thread Yousong Zhou
On 9 October 2014 16:32, John Crispin wrote: > Hi Yousong > > thanks for clarifying. i would prefer to use the uboot-envtools > version that you sent a patch for unless there are any technical > reasons to use the kernel based patch. I take `/etc/init.d/done` as a better indication of a successfu

Re: [OpenWrt-Devel] [PATCH] ar71xx: qihoo-c301: reset imageNtrynum after each successful boot.

2014-10-08 Thread Yousong Zhou
On 7 October 2014 02:33, John Crispin wrote: > > On 14/09/2014 02:27, Yousong Zhou wrote: >> Qihoo C301 has 2 flash chips of which one is used as primary and the >> other is used as backup. OEM U-Boot will try to boot an activeregion N >> with imageNstatus=0 and imageNtr

Re: [OpenWrt-Devel] desperately seeking info on this weird MT7620A/MT7610EN dev board

2014-10-08 Thread Yousong Zhou
On 9 October 2014 01:27, Robert P. J. Day wrote: > i can't even get to the page in [1], and the router in [2] is listed > as based on AR9331, not MT7620A, so i'm fairly sure that can't be it. > i'll keep trying the first link. Yes, HC6361 is AR9331 based. It is said that HiWiFi switched to Med

Re: [OpenWrt-Devel] desperately seeking info on this weird MT7620A/MT7610EN dev board

2014-10-08 Thread Yousong Zhou
On Oct 8, 2014 4:33 PM, "Robert P. J. Day" > i'm looking at this page: > > http://www.cleanrouter.com/home/product > > and the processor is shown as an atheros AR7161, though. also, the > pandoras hope router apparently has 4 wired ports, and this board has > only two. at the risk of abusing this

Re: [OpenWrt-Devel] [RFC] ar71xx: fix seama factory type image generation.

2014-09-28 Thread Yousong Zhou
Add Gabor Juhos and Felix Kaechele to cc list. I tend to think this patch can and should be merged as it is clear that firmwares generated by current method won't work anyway. On 14 September 2014 22:07, Yousong Zhou wrote: > Currently JFFS2 end-of-filesystem marker 0xdeadc0de is incl

Re: [OpenWrt-Devel] missing debootstrap-udeb_1.0.61_all.udeb

2014-09-27 Thread Yousong Zhou
hi On 27 September 2014 05:44, Robert P. J. Day wrote: > > Download failed. > --2014-09-26 17:31:12-- > http://downloads.openwrt.org/sources/debootstrap-udeb_1.0.61_all.udeb > > should this exist somewhere? > It should try first the URL as specified in the package Makefile. But that retrieval

Re: [OpenWrt-Devel] wireless scan/add functioning wrong on my MTK7620n board

2014-09-25 Thread Yousong Zhou
hi On 26 September 2014 02:36, 张钊 wrote: > It seems that the weird reboot was caused by the power adapter I used, it > cannot provide enough power output, after changing it the board went normal, > but that warning is still there on UART Console when I add multiple SSID from > Luci interface.

Re: [OpenWrt-Devel] wireless scan/add functioning wrong on my MTK7620n board

2014-09-24 Thread Yousong Zhou
On 25 September 2014 12:06, 张钊 wrote: > I’ve built a firmware from git.openwrt.org/openwrt.git known as CHAOS > CALMER (Bleeding Edge, r42657) for my MTK7620n board, it works well except > this weird problem. > > When I enable wifi, then trying to use iw dev wlan0 scan or trying to add > secondar

Re: [OpenWrt-Devel] On support status of OpenWrt for Qihoo C301

2014-09-23 Thread Yousong Zhou
On 24 September 2014 12:10, swigger wrote: > I think they are in parallel connection, you can have a look at the circuit. > i cannot see it from the circuit. but i do believe that it's more likely that only 2 GPIOs are used to drive the leds. anyway, there is only one window for presentation on

<    1   2   3   4   5   6   7   8   >