From ce743da17109f113adcfc672d905f38d6a89296b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 6 May 2015 09:47:22 -0700 Subject: [PATCH] ip: document exit code The ip command has always had a consistent exit status document it so that developers see it. --- man/man8/ip.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/man/man8/ip.8 b/man/man8/ip.8 index 43ddac913..045414dd5 100644 --- a/man/man8/ip.8 +++ b/man/man8/ip.8 @@ -245,7 +245,7 @@ Use color output. .PP The names of all objects may be written in full or -abbreviated form, for exampe +abbreviated form, for example .B address can be abbreviated as .B addr @@ -275,6 +275,10 @@ Usually it is or, if the objects of this class cannot be listed, .BR "help" . +.SH EXIT STATUS +Exit status is 0 if command was successful, and 1 if there is a syntax error. +If an error was reported by the kernel exit status is 2. + .SH HISTORY .B ip was written by Alexey N. Kuznetsov and added in Linux 2.2. -- 2.47.2