From: Marcela Maslanova <mmaslano@redhat.com>
To: shemminger@vyatta.com
Cc: netdev@vger.kernel.org
Subject: [PATCH] IPROUTE: tc correct error message
Date: Mon, 22 Sep 2008 15:52:36 +0200 [thread overview]
Message-ID: <48D7A324.3050401@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
This warning message was removed in change
083a5f00a15f6506815b0da2be82e7be761c5cbc
In this patch is checked, whether warning should be printed. Output
of "tc filter <type> help" isn't spoiled after my change.
--
Marcela Mašláňová
BaseOS team Brno
[-- Attachment #2: 0001-tc-error-message-protocol-is-needed.patch --]
[-- Type: text/x-patch, Size: 1366 bytes --]
>From e007577ef506671896857808634f3326d69b5072 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= <mmaslano@redhat.com>
Date: Mon, 22 Sep 2008 15:41:04 +0200
Subject: [PATCH] tc error message: protocol is needed.
This message was removed in change 083a5f00a15f6506815b0da2be82e7be761c5cbc
but now it's checked, whether it should be print and don't spoil
help messages.
---
tc/tc_filter.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/tc/tc_filter.c b/tc/tc_filter.c
index 177446e..ce30dd9 100644
--- a/tc/tc_filter.c
+++ b/tc/tc_filter.c
@@ -120,7 +120,9 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)
if (parse_estimator(&argc, &argv, &est) < 0)
return -1;
} else if (matches(*argv, "help") == 0) {
+ protocol_set = 1;
usage();
+ return 0;
} else {
strncpy(k, *argv, sizeof(k)-1);
@@ -128,7 +130,6 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)
argc--; argv++;
break;
}
-
argc--; argv++;
}
@@ -153,6 +154,11 @@ int tc_filter_modify(int cmd, unsigned flags, int argc, char **argv)
return -1;
}
}
+ if (!protocol_set) {
+ fprintf(stderr, "\"protocol\" is required.\n");
+ return -1;
+ }
+
if (est.ewma_log)
addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));
--
1.5.5.2
next reply other threads:[~2008-09-22 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 13:52 Marcela Maslanova [this message]
2008-10-13 14:00 ` [PATCH] IPROUTE: tc correct error message Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48D7A324.3050401@redhat.com \
--to=mmaslano@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.