[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.

[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 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 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 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 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 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 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 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 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 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

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 >

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_

[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] 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 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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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

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

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

[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

[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 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 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 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 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

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 ___

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-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

[OpenWrt-Devel] [PATCH 1/2] package: remove references to symbols TARGET_{ps3, pxcab}.

2014-12-23 Thread Yousong Zhou
Target pxcab and ps3 were removed from maintaince in r34764 and r34765 respectively. Signed-off-by: Yousong Zhou --- package/kernel/mac80211/Makefile |2 +- package/network/utils/ipset/Makefile |6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package/kernel

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

2014-12-23 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

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

2014-12-23 Thread Yousong Zhou
On 22 December 2014 at 22:46, Felix Fietkau wrote: > On 2014-12-16 22:15, Yousong Zhou wrote: >> It can be used to fill caller specified buffer area with data already in >> ustream read buffer. Useful in the following use pattern. >> >> int available = ustream_pe

[OpenWrt-Devel] [PATCH v2 1/2] package: remove references to symbols TARGET_{ps3, pxcab}.

2014-12-30 Thread Yousong Zhou
Target pxcab and ps3 were removed from maintaince in r34764 and r34765 respectively. Signed-off-by: Yousong Zhou --- package/kernel/mac80211/Makefile |2 +- package/network/utils/ipset/Makefile |6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package/kernel

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

2014-12-30 Thread Yousong Zhou
. - Add a patch to let the Makefile of dnsmasq be aware of changes in COPTS variable. Big thanks goes to Frank Schäfer for providing necessary information on connections and dependency relations between these CONFIGs and packages. Signed-off-by: Yousong Zhou --- v2 <- v1 -

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

2014-12-31 Thread Yousong Zhou
Hi, Frank On 31 December 2014 at 18:33, Frank Schäfer wrote: > Am 30.12.2014 um 13:18 schrieb Yousong Zhou: >> This patch tries to >> >> - Let the DHCPv6 feature depend on CONFIG_IPV6. >> - Conditionally select libnettle, kmod-ipv6, kmod-ipt-ipset only if the >&

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

2015-01-04 Thread Yousong Zhou
On 2 January 2015 at 02:05, Frank Schäfer wrote: > > Hi Yousong, > > Am 31.12.2014 um 11:48 schrieb Yousong Zhou: >> >> ... >>> tmp/.config-package.in:93:error: recursive dependency detected! >>> tmp/.config-package.in:93: symbol PACKAGE_dnsmasq-full

Re: [OpenWrt-Devel] [PATCH] firewall3: fix left shift on 64 bit systems in fw3_bitlen2netmask

2015-01-06 Thread Yousong Zhou
On 5 January 2015 at 22:58, Ulrich Weber wrote: > otherwise 0.0.0.0/0 is set as 0.0.0.0/255.255.255.255 on x86_64 > > Signed-off-by: Ulrich Weber > --- > utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils.c b/utils.c > index 71a0f13..b2fbe02 100644 > --- a/uti

Re: [OpenWrt-Devel] procd limits usage

2015-01-07 Thread Yousong Zhou
On 7 January 2015 at 00:19, Karl Palsson wrote: > Hi, > > I'm trying out using procd to kill/restart processes that use too much > memory, using the "limits" feature added in > https://lists.openwrt.org/pipermail/openwrt-devel/2013-December/022793.html > and I've confirmed that it's available in t

Re: [OpenWrt-Devel] procd limits usage

2015-01-07 Thread Yousong Zhou
On 7 January 2015 at 20:16, Karl Palsson wrote: > > Yousong Zhou wrote: >> >> Which libc was in use? Because RLIMIT_DATA only applies to those >> allocated by brk() and sbrk(), while malloc() of glibc may fallback to >> mmap() if sbrk() fails. AFAIK, malloc()

Re: [OpenWrt-Devel] [PATCH v2] [ar71xx] add support for TP-LINK TL-WA701ND v2

2015-01-19 Thread Yousong Zhou
On 19 January 2015 at 19:00, Luigi Tarenga wrote: > add support for TP-LINK TL-WA701ND v2 > > Signed-off-by: Luigi Tarenga > --- > new attempt. I removed the refactoring portion in previous version > and corrected the diff stat. I hope this time it's fine. > Looks like it's whitespace broken thi

[OpenWrt-Devel] [PATCH 1/5] uloop: fix out-of-bound loop index.

2015-01-21 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- uloop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uloop.c b/uloop.c index 9a77ce4..3224f4b 100644 --- a/uloop.c +++ b/uloop.c @@ -394,11 +394,11 @@ int uloop_fd_delete(struct uloop_fd *fd) { int i; - for (i = 0; i

[OpenWrt-Devel] [PATCH 2/5] ustream: add function ustream_read().

2015-01-21 Thread Yousong Zhou
d(s, &h, sizeof(h)); } Signed-off-by: Yousong Zhou --- ustream.c | 20 ustream.h | 5 + 2 files changed, 25 insertions(+) diff --git a/ustream.c b/ustream.c index 828a025..fc93bc2 100644 --- a/ustream.c +++ b/ustream.c @@ -333,6 +333,26 @@ char *ustream_get_r

[OpenWrt-Devel] [PATCH 4/5] uloop: optimize uloop_timeout_set() implementaiton a bit.

2015-01-21 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- uloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uloop.c b/uloop.c index 3224f4b..883f6f1 100644 --- a/uloop.c +++ b/uloop.c @@ -453,14 +453,14 @@ int uloop_timeout_set(struct uloop_timeout *timeout, int msecs) if (timeout

[OpenWrt-Devel] [PATCH 3/5] ustream-fd: fix logic invert of write polling.

2015-01-21 Thread Yousong Zhou
ustream_write_pending() returns true if write buffer was flushed there. Signed-off-by: Yousong Zhou --- ustream-fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ustream-fd.c b/ustream-fd.c index 4abb530..bc44d4a 100644 --- a/ustream-fd.c +++ b/ustream-fd.c @@ -119,7

[OpenWrt-Devel] [PATCH 5/5] utils: use clock_get_time() for clock_gettime() on Apple.

2015-01-21 Thread Yousong Zhou
It turns out that mach_absolute_time() is not monotonic at all. While at it, convert the CLOCK_REALTIME implementation to using clock_get_time() as well. Signed-off-by: Yousong Zhou --- I am not sure though whether the detection for clock_gettime() is still necessary for Apple platform though

Re: [OpenWrt-Devel] [PATCH 1/5] uloop: fix out-of-bound loop index.

2015-01-22 Thread Yousong Zhou
On 22 January 2015 at 02:58, Felix Fietkau wrote: > On 2015-01-21 14:21, Yousong Zhou wrote: >> Signed-off-by: Yousong Zhou >> --- >> uloop.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/uloop.c b/uloop.c >> i

[OpenWrt-Devel] [RFC 0/7] Enhancement for kexec of MIPS kernel.

2015-01-23 Thread Yousong Zhou
xec -d --command-line='board=HiWiFi-HC6361 console=ttyATH0,115200 noinitrd' -l /tmp/vmlinux-initramfs.elf.gz kexec -d -e The kernel patch looks shabby and contains many pr_info() and friends for debugging purposes at the moment. Maybe we will clean them up later as the patch mature

[OpenWrt-Devel] [RFC 1/7] kexec-tools: add patch for fixing kexec-tools' configure.ac.

2015-01-23 Thread Yousong Zhou
Add necessary quoting to fix the following error when running the generated configure script. checking for lzma_code in -llzma... ./configure: line 4756: ac_fn_c_try_link: command not found Signed-off-by: Yousong Zhou --- .../kexec-tools/patches/101-fix-configure_ac.patch | 33

[OpenWrt-Devel] [RFC 2/7] kexec-tools: add patch for fixing zlib/lzma decompression.

2015-01-23 Thread Yousong Zhou
Let {zlib,lzma}_decompress_file() return NULL if anything wrong happened thus to allow other decompression methods have a chance to try. Signed-off-by: Yousong Zhou --- .../patches/102-fix-zlib-lzma-decompress.patch | 101 1 file changed, 101 insertions(+) create mode

[OpenWrt-Devel] [RFC 3/7] kexec-tools: add patch for fixing compilation warnings.

2015-01-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- .../patches/103-fix-compilation-warnings.patch | 79 1 file changed, 79 insertions(+) create mode 100644 package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch diff --git a/package/boot/kexec-tools/patches/103-fix

[OpenWrt-Devel] [RFC 5/7] kexec-tools: show up only when KERNEL_KEXEC is enabled.

2015-01-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- package/boot/kexec-tools/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 8c1c255..e884661 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package

[OpenWrt-Devel] [RFC 4/7] kexec-tools: remove unnecessary patch 0004-mips_regdefs.patch.

2015-01-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- .../kexec-tools/patches/0004-mips_regdefs.patch| 103 1 file changed, 103 deletions(-) delete mode 100644 package/boot/kexec-tools/patches/0004-mips_regdefs.patch diff --git a/package/boot/kexec-tools/patches/0004-mips_regdefs.patch b

[OpenWrt-Devel] [RFC 6/7] kexec-tools: add choice for selecting lzma support.

2015-01-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- package/boot/kexec-tools/Config.in |5 + package/boot/kexec-tools/Makefile |6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package/boot/kexec-tools/Config.in b/package/boot/kexec-tools/Config.in index 2642171..6c7558f

[OpenWrt-Devel] [RFC 7/7] mips/kexec: parse and use parameters specified by userspace kexec tool.

2015-01-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- .../333-kexec-parameter-from-kexec-tools.patch | 298 .../333-kexec-parameter-from-kexec-tools.patch | 298 2 files changed, 596 insertions(+) create mode 100644 target/linux/generic/patches-3.10/333-kexec

[OpenWrt-Devel] [PATCH 0/4] uci: a few enhancements.

2015-01-24 Thread Yousong Zhou
This cover letter is mainly for noting that the series is for UCI repo. Yousong Zhou (4): tests: add test cases for showing nonexistent section and option. cli: properly unload package before quit. cli: enhance "uci show" command on nonexistent sections and options. Add a few no

[OpenWrt-Devel] [PATCH 1/4] tests: add test cases for showing nonexistent section and option.

2015-01-24 Thread Yousong Zhou
Also fix the false error message about absence of uci-static. Signed-off-by: Yousong Zhou --- test/tests.d/050_show |3 +++ test/tests.sh |2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/tests.d/050_show b/test/tests.d/050_show index ce0eafc..161bae0

[OpenWrt-Devel] [PATCH 2/4] cli: properly unload package before quit.

2015-01-24 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- cli.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cli.c b/cli.c index 2ee1e36..8f32255 100644 --- a/cli.c +++ b/cli.c @@ -286,7 +286,7 @@ static int package_cmd(int cmd, char *tuple) { struct uci_element *e = NULL

[OpenWrt-Devel] [PATCH 3/4] cli: enhance "uci show" command on nonexistent sections and options.

2015-01-24 Thread Yousong Zhou
When doing "uci show network.nilsection", the current behaviour is that uci will emit a error message complaining "Entry not found", then continue to show all content of the package network itself. This is couter-intuition. Signed-off-by: Yousong Zhou --- cli.c |1

[OpenWrt-Devel] [PATCH 4/4] Add a few notes on the return value of uci_lookup_ptr().

2015-01-24 Thread Yousong Zhou
While at it, use UCI_OK instead of literal integer 0 for return value of uci_lookup_ptr(). Signed-off-by: Yousong Zhou --- list.c |5 +++-- uci.h |7 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/list.c b/list.c index 0d00f81..321861c 100644 --- a/list.c +++ b

Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread Yousong Zhou
Hi, On 30 January 2015 at 15:19, wengbj wrote: > --- > .../linux/ramips/base-files/etc/board.d/02_network |7 +++ > target/linux/ramips/dts/FIREWRT.dts|5 + > 2 files changed, 12 insertions(+) > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network

Re: [OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail

2015-01-30 Thread Yousong Zhou
On 30 January 2015 at 15:19, wengbj wrote: > --- > target/linux/ramips/dts/FIREWRT.dts |9 + > 1 file changed, 9 insertions(+) > > diff --git a/target/linux/ramips/dts/FIREWRT.dts > b/target/linux/ramips/dts/FIREWRT.dts > index 4e9e28b..ddad8bf 100644 > --- a/target/linux/ramips/dts/

Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT

2015-01-30 Thread Yousong Zhou
Hi, wengbj It's just that OpenWrt requires a Signed-off-by line for patches to be accepted [1]. That line can be generated by option -s in command `git format-patch -s ...' [1] https://dev.openwrt.org/wiki/SubmittingPatches Regards yousong On 30 January 2015 at 17:04, wengbj

Re: [OpenWrt-Devel] cmake.mk: ignores package CFLAGS

2015-02-01 Thread Yousong Zhou
Hi, Rafał Miłecki On 1 February 2015 at 18:59, Rafał Miłecki wrote: > On 9 January 2015 at 10:51, Rafał Miłecki wrote: >> If you look at include/cmake.mk you will notice followiing: >> -DCMAKE_BUILD_TYPE=Release >> It means that CMake uses CMAKE_C_FLAGS_RELEASE >> I am a newcomer at cmake, bu

[OpenWrt-Devel] [PATCH 0/5] Enhancement for kexec of MIPS kernel

2015-02-10 Thread Yousong Zhou
intf(). - Patch 100-reduce_size.patch is now dropped mainly because the size reduction is considered marginal. Yousong Zhou (5): generic: add a few missing symbols for generic config-3.19. malta: add config file for kernel 3.19. generic: improve kexec support of MIPS. kexec-tools: show up only when KER

[OpenWrt-Devel] [PATCH 1/5] generic: add a few missing symbols for generic config-3.19.

2015-02-10 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- target/linux/generic/config-3.19 |2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/generic/config-3.19 b/target/linux/generic/config-3.19 index 0f3fe4a..a5586db 100644 --- a/target/linux/generic/config-3.19 +++ b/target/linux/generic/config

[OpenWrt-Devel] [PATCH 2/5] malta: add config file for kernel 3.19.

2015-02-10 Thread Yousong Zhou
This is based on config-3.18 with the following changes. - CONFIG_GENERIC_NET_UTILS is removed as it is already set in generic kernel config. - CONFIG_CPU_MICROMIPS is explicitly unset as required in kernel 3.19. Signed-off-by: Yousong Zhou --- target/linux/malta/config-3.19 | 256

[OpenWrt-Devel] [PATCH 4/5] kexec-tools: show up only when KERNEL_KEXEC is enabled.

2015-02-10 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- package/boot/kexec-tools/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 8c1c255..e884661 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package

[OpenWrt-Devel] [PATCH 5/5] kexec-tools: bump version from v2.0.4 to v2.0.9.

2015-02-10 Thread Yousong Zhou
pport enabled. - Before: 41447 - After: 42583 Signed-off-by: Yousong Zhou --- package/boot/kexec-tools/Config.in |5 + package/boot/kexec-tools/Makefile | 12 +- .../patches/0001-Fix-zlib-lzma-decompression.patch | 171 ...c-

[OpenWrt-Devel] [PATCH 3/5] generic: improve kexec support of MIPS.

2015-02-10 Thread Yousong Zhou
F kernel file are invalid. Signed-off-by: Yousong Zhou --- ...Mark-kernel-code-and-kernel-data-segments.patch | 37 +++ ...Accept-command-line-parameters-from-users.patch | 305 +++ ...Mark-kernel-code-and-kernel-data-segments.patch | 39 +++ ...Accept-command-line-paramet

Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for TP-Link MR12U v1 board

2015-02-11 Thread Yousong Zhou
On 12 February 2015 at 07:53, 郭传鈜 wrote: > This patch is useless now.We don't need to change mktplinkfw.c .The flash > layout is defined in target/linux/ar71xx/image/Makefile :-D > It's okay. I have found it useful for inspection purposes ( -i ) several times before. yousong >

[OpenWrt-Devel] [PATCH] generic: fix broken patch in the transition of 3.19 from -rc5 to release .0

2015-02-11 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- target/linux/generic/patches-3.19/304-mips_disable_fpu.patch |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/patches-3.19/304-mips_disable_fpu.patch b/target/linux/generic/patches-3.19/304-mips_disable_fpu.patch index

Re: [OpenWrt-Devel] [PATCH 3/5] generic: improve kexec support of MIPS.

2015-02-12 Thread Yousong Zhou
On 12 February 2015 at 14:34, John Crispin wrote: > > > Hi, > > after some very basic testing i would suggest that > > On 10/02/2015 13:10, Yousong Zhou wrote: >> create mode 100644 >> target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kern

Re: [OpenWrt-Devel] [PATCH 3/5] generic: improve kexec support of MIPS.

2015-02-13 Thread Yousong Zhou
On 12 February 2015 at 19:59, John Crispin wrote: > Hi, > > found something while merging the patches. see below ... > > On 10/02/2015 13:10, Yousong Zhou wrote: >> - Allow --command-line parameters of kexec-tools be parsed and used by >>the kernel. >> - Fo

Re: [OpenWrt-Devel] [PATCH] Retry 6rd if wan is down

2015-02-13 Thread Yousong Zhou
On 13 February 2015 at 17:05, Daniel Gimpelevich wrote: > Currently, if you have dual WAN and the link needed for 6rd is down, it > just silently fails. This patch makes it retry in case the link comes up. > > Signed-off-by: Daniel Gimpelevich > --- a/package/network/ipv6/6rd/files/6rd.sh (re

Re: [OpenWrt-Devel] [PATCH 1/2] fix building with json-c.0.12

2015-02-27 Thread Yousong Zhou
On 26 February 2015 at 23:52, William Holland wrote: > --- > CMakeLists.txt |7 +++ > plug/hotplug.c |6 +- > service/validate.c |6 +- > 3 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index 5414677..058d774 100

Re: [OpenWrt-Devel] [PATCH] procd: Use pkg-config to find json-c

2015-03-04 Thread Yousong Zhou
Hi, Karl On 4 March 2015 at 21:51, Karl Palsson wrote: > > Comments inline, I thought I'd made similar comments earlier, but > perhaps I forgot... > > William Holland wrote: >> --- >> CMakeLists.txt |4 >> plug/hotplug.c |2 +- >> service/validate.c |2 +- >> 3 files ch

[OpenWrt-Devel] [PATCH 2/3] cli: fix return value of package_cmd().

2015-03-07 Thread Yousong Zhou
It's a bug revealed by commit 446e774 "cli: properly unload package before quit". The current code would exit with value 1 even if uci_export() succceeded. Signed-off-by: Yousong Zhou --- cli.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli.

[OpenWrt-Devel] [PATCH 1/3] testenv: test for exit status of "uci export".

2015-03-07 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/tests.d/010_export | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/tests.d/010_export b/test/tests.d/010_export index 259f988..beb0f6c 100644 --- a/test/tests.d/010_export +++ b/test/tests.d/010_export @@ -1,6 +1,14

[OpenWrt-Devel] [PATCH 3/3] lua: return module table instead of boolean value on require('uci').

2015-03-07 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- lua/uci.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/uci.c b/lua/uci.c index 8ace746..6ba7da0 100644 --- a/lua/uci.c +++ b/lua/uci.c @@ -994,8 +994,9 @@ luaopen_uci(lua_State *L) /* create module */ lua_newtable

[OpenWrt-Devel] [PATCH 0/3] uci: a few fixes.

2015-03-07 Thread Yousong Zhou
long time. [1] https://github.com/openwrt/luci/blob/master/modules/luci-base/luasrc/model/uci.lua#L5 Yousong Zhou (2): cli: fix return value of package_cmd(). lua: return module table instead of boolean value on require('uci'). cli.c |2 ++ lua/uci.c |3 ++- 2 files c

[OpenWrt-Devel] [PATCH v2 0/3] uci: a few fixes.

2015-03-17 Thread Yousong Zhou
This cover letter is mainly for noting that this series is for the uci repo. v2 <- v1 - Fix a typo in the 1st patch causing an existing test being commented out. - More verbose commit message for the 3rd patch. Yousong Zhou (3): testenv: test for exit status of "uci export"

[OpenWrt-Devel] [PATCH v2 1/3] testenv: test for exit status of "uci export".

2015-03-17 Thread Yousong Zhou
Signed-off-by: Yousong Zhou --- test/tests.d/010_export |8 1 file changed, 8 insertions(+) diff --git a/test/tests.d/010_export b/test/tests.d/010_export index 259f988..584bcc8 100644 --- a/test/tests.d/010_export +++ b/test/tests.d/010_export @@ -1,6 +1,14 @@ test_export

[OpenWrt-Devel] [PATCH v2 2/3] cli: fix return value of package_cmd().

2015-03-17 Thread Yousong Zhou
It's a bug revealed by commit 446e774 "cli: properly unload package before quit". The current code would exit with value 1 even if uci_export() succceeded. Signed-off-by: Yousong Zhou --- cli.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli.

[OpenWrt-Devel] [PATCH v2 3/3] lua: restore return value of require('uci') to module table.

2015-03-17 Thread Yousong Zhou
value true. Also fix the return value of luaopen_uci() to 1 to indicate the number of return value on stack. Signed-off-by: Yousong Zhou --- lua/uci.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/uci.c b/lua/uci.c index 8ace746..6ba7da0 100644 --- a/lua/uci.c +++ b

Re: [OpenWrt-Devel] Rebuilding for specific hardware, example ar71xx/image for TP-Link TL-WR841ND

2015-03-23 Thread Yousong Zhou
On 23 March 2015 at 17:49, Jean-Michel Pouré - GOOZE wrote: >> /target/linux/ar71xx/image/Makefile > > I read buildroot WIKI page: > http://wiki.openwrt.org/doc/howto/build > > Pardon my ignorance, I am new to OpenWRT. > > If I select target TP-Link TL-WR841ND in target of make-menuconfig > this t

<    1   2   3   4   5   6   7   8   >