{"id":876,"url":"http://patchwork.ozlabs.org/api/1.0/patches/876/?format=json","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.0/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<48D7A324.3050401@redhat.com>","date":"2008-09-22T13:52:36","name":"IPROUTE: tc correct error message","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":true,"hash":"2f36472f345c05fdfda10e25cc6edd22f51ed5f7","submitter":{"id":395,"url":"http://patchwork.ozlabs.org/api/1.0/people/395/?format=json","name":"Marcela Maslanova","email":"mmaslano@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/48D7A324.3050401@redhat.com/mbox/","series":[],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/876/checks/","tags":{},"headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Received":["from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 4D369DDD04\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 22 Sep 2008 23:52:41 +1000 (EST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752162AbYIVNwf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 09:52:35 -0400","(majordomo@vger.kernel.org) by vger.kernel.org id S1752109AbYIVNwf\n\t(ORCPT <rfc822; netdev-outgoing>); Mon, 22 Sep 2008 09:52:35 -0400","from mx2.redhat.com ([66.187.237.31]:47758 \"EHLO mx2.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752131AbYIVNwe (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 22 Sep 2008 09:52:34 -0400","from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com\n\t[172.16.27.26])\n\tby mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m8MDqYoe031590;\n\tMon, 22 Sep 2008 09:52:34 -0400","from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199])\n\tby int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id\n\tm8MDqXAn006811; Mon, 22 Sep 2008 09:52:33 -0400","from caladan.englab.brq.redhat.com (caladan.englab.brq.redhat.com\n\t[10.34.32.66])\n\tby ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m8MDqVaV011424;\n\tMon, 22 Sep 2008 09:52:32 -0400"],"Message-ID":"<48D7A324.3050401@redhat.com>","Date":"Mon, 22 Sep 2008 15:52:36 +0200","From":"Marcela Maslanova <mmaslano@redhat.com>","User-Agent":"Thunderbird 2.0.0.16 (X11/20080723)","MIME-Version":"1.0","To":"shemminger@vyatta.com","CC":"netdev@vger.kernel.org","Subject":"[PATCH] IPROUTE: tc correct error message","Content-Type":"multipart/mixed;\n\tboundary=\"------------060701050505060606020504\"","X-Scanned-By":"MIMEDefang 2.58 on 172.16.27.26","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"This warning message was removed in change \n083a5f00a15f6506815b0da2be82e7be761c5cbc\nIn this patch is checked, whether warning should be printed. Output\nof \"tc filter <type> help\" isn't spoiled after my change.","diff":"From e007577ef506671896857808634f3326d69b5072 Mon Sep 17 00:00:00 2001\nFrom: =?utf-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= <mmaslano@redhat.com>\nDate: Mon, 22 Sep 2008 15:41:04 +0200\nSubject: [PATCH] tc error message: protocol is needed.\n This message was removed in change 083a5f00a15f6506815b0da2be82e7be761c5cbc\n but now it's checked, whether it should be print and don't spoil\n help messages.\n\n---\n tc/tc_filter.c |    8 +++++++-\n 1 files changed, 7 insertions(+), 1 deletions(-)\n\ndiff --git a/tc/tc_filter.c b/tc/tc_filter.c\nindex 177446e..ce30dd9 100644\n--- a/tc/tc_filter.c\n+++ b/tc/tc_filter.c\n@@ -120,7 +120,9 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)\n \t\t\tif (parse_estimator(&argc, &argv, &est) < 0)\n \t\t\t\treturn -1;\n \t\t} else if (matches(*argv, \"help\") == 0) {\n+\t\t\tprotocol_set = 1;\n \t\t\tusage();\n+\t\t\treturn 0;\n \t\t} else {\n \t\t\tstrncpy(k, *argv, sizeof(k)-1);\n \n@@ -128,7 +130,6 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)\n \t\t\targc--; argv++;\n \t\t\tbreak;\n \t\t}\n-\n \t\targc--; argv++;\n \t}\n \n@@ -153,6 +154,11 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)\n \t\t\treturn -1;\n \t\t}\n \t}\n+\tif (!protocol_set) {\n+\t\tfprintf(stderr, \"\\\"protocol\\\" is required.\\n\");\n+\t\treturn -1;\n+\t}\n+\n \tif (est.ewma_log)\n \t\taddattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));\n \n-- \n1.5.5.2\n\n","prefixes":[]}