summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-02-23 17:21:42 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-02-23 17:23:29 +0100
commit6b1ebf3c3c8270fa8cf8a59b3204652add55e383 (patch)
tree7c44131002fd3e1e0e6a2c4379230693a37b74cd /tools
parenttools: finer-grained error codes for checkpatch (diff)
parentMerge pull request #1792 from pguibert6WIND/issue_1786 (diff)
downloadfrr-6b1ebf3c3c8270fa8cf8a59b3204652add55e383.tar.xz
frr-6b1ebf3c3c8270fa8cf8a59b3204652add55e383.zip
Merge branch 'master' into stylechecker
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkpatch.sh4
-rwxr-xr-xtools/frr-reload.py9
-rw-r--r--tools/start-stop-daemon.c2
3 files changed, 11 insertions, 4 deletions
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 930c8e2df..e6110f0c7 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -70,9 +70,9 @@ else
echo "Done."
for file in /tmp/f1/*_cp; do
if [ -a /tmp/f2/$(basename $file) ]; then
- result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING")
+ result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1')
else
- result=$(cat $file | grep -A4 "ERROR\|WARNING")
+ result=$(cat $file | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1')
fi
if [ "$?" -eq "0" ]; then
echo "Report for $(basename $file _cp)" 1>&2
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index 2c651ffbd..0b7e80962 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -434,7 +434,14 @@ end
new_ctx = False
log.debug('LINE %-50s: entering new context, %-50s', line, ctx_keys)
- elif "vni " in line:
+ # The 'vni' keyword under 'router bgp X/address-family l2vpn evpn' creates
+ # a sub-context but the 'vni' keyword in other places (such as 'vrf BLUE')
+ # does not.
+ elif ("vni " in line and
+ len(ctx_keys) == 2 and
+ ctx_keys[0].startswith('router bgp') and
+ ctx_keys[1] == 'address-family l2vpn evpn'):
+
main_ctx_key = []
# Save old context first
diff --git a/tools/start-stop-daemon.c b/tools/start-stop-daemon.c
index 8dc16f420..6bf55b774 100644
--- a/tools/start-stop-daemon.c
+++ b/tools/start-stop-daemon.c
@@ -396,7 +396,7 @@ static void parse_schedule_item(const char *string, struct schedule_item *item)
if (!strcmp(string, "forever")) {
item->type = sched_forever;
- } else if (isdigit(string[0])) {
+ } else if (isdigit((int)string[0])) {
item->type = sched_timeout;
if (parse_integer(string, &item->value) != 0)
badusage("invalid timeout value in schedule");