naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone
Blob Blame History Raw
From a1655d17463e2a71af8d43381333c14661ad1e50 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Mon, 7 Mar 2016 20:32:48 +0100
Subject: [PATCH] iprule: Align help text with man page synopsis

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1251186
Upstream Status: iproute2.git commit 67eedcd9a145f
Conflicts: Patch adjusted to missing save/restore support.

commit 67eedcd9a145f30aa0a185b7235f01b66349effe
Author: Phil Sutter <phil@nwl.cc>
Date:   Thu Feb 25 13:07:35 2016 +0100

    iprule: Align help text with man page synopsis

    The help text was misleading: One could think it is possible to list
    rules by selector, which would be nice but isn't. This change also
    clarifies that 'ip rule' defaults to 'list' if no further arguments are
    given.

    Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 ip/iprule.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ip/iprule.c b/ip/iprule.c
index 89fa7ef..059b50b 100644
--- a/ip/iprule.c
+++ b/ip/iprule.c
@@ -32,7 +32,9 @@ static void usage(void) __attribute__((noreturn));
 
 static void usage(void)
 {
-	fprintf(stderr, "Usage: ip rule [ list | add | del | flush ] SELECTOR ACTION\n");
+	fprintf(stderr, "Usage: ip rule { add | del } SELECTOR ACTION\n");
+	fprintf(stderr, "       ip rule { flush }\n");
+	fprintf(stderr, "       ip rule [ list ]\n");
 	fprintf(stderr, "SELECTOR := [ not ] [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK[/MASK] ]\n");
 	fprintf(stderr, "            [ iif STRING ] [ oif STRING ] [ pref NUMBER ]\n");
 	fprintf(stderr, "ACTION := [ table TABLE_ID ]\n");
-- 
1.8.3.1