Re: [patch iproute2 v4 2/3] tc: Add -bs option to batch mode

2018-01-02 Thread Chris Mi
On Tue, Jan 02, 2018 at 11:28:03PM +0900, Chris Mi wrote: @@ -240,23 +244,49 @@ static int batch(const char *name) } cmdlineno = 0; - while (getcmdline(&line, &len, stdin) != -1) { + if (getcmdline(&line, &len, stdin) == -1) + goto Exit; + do {

Re: [patch iproute2 v4 2/3] tc: Add -bs option to batch mode

2018-01-02 Thread Marcelo Ricardo Leitner
On Tue, Jan 02, 2018 at 11:28:03PM +0900, Chris Mi wrote: > @@ -240,23 +244,49 @@ static int batch(const char *name) > } > > cmdlineno = 0; > - while (getcmdline(&line, &len, stdin) != -1) { > + if (getcmdline(&line, &len, stdin) == -1) > + goto Exit; > + do {

[patch iproute2 v4 2/3] tc: Add -bs option to batch mode

2018-01-02 Thread Chris Mi
Signed-off-by: Chris Mi --- tc/m_action.c | 90 -- tc/tc.c| 69 +--- tc/tc_common.h | 8 +++- tc/tc_filter.c | 121 + 4 files changed, 220 insertions(+), 68 del