1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 10:59:02 +00:00

Normalize the Ndiff exit codes.

0 if the scans are equal,
	1 if they differ, and
	2 for runtime errors.
Add tests and man page documentation.
This commit is contained in:
david
2009-07-30 14:40:46 +00:00
parent 24b5c338b6
commit 05e5348b57
4 changed files with 115 additions and 4 deletions

View File

@@ -2,12 +2,12 @@
.\" Title: ndiff
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
.\" Date: 07/22/2009
.\" Date: 07/30/2009
.\" Manual: User Commands
.\" Source: Ndiff
.\" Language: English
.\"
.TH "NDIFF" "1" "07/22/2009" "Ndiff" "User Commands"
.TH "NDIFF" "1" "07/30/2009" "Ndiff" "User Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -370,6 +370,44 @@ If the script is saved as
.RE
.\}
.sp
.SH "EXIT CODE"
.PP
The exit code indicates whether the scans are equal\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
0 means that the scans are the same in all the aspects Ndiff knows about\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
1 means that the scans differ\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
2 indicates a runtime error, such as the failure to open a file\&.
.RE
.sp
.RE
.SH "BUGS"
.PP
Report bugs to the

View File

@@ -355,6 +355,21 @@ ln -sf scan-$date.xml scan-prev.xml
</para>
</refsect1>
<refsect1>
<title>Exit Code</title>
<para>
The exit code indicates whether the scans are equal.
<itemizedlist spacing="compact">
<listitem><para>0 means that the scans are the same in all the
aspects Ndiff knows about.</para></listitem>
<listitem><para>1 means that the scans differ.</para></listitem>
<listitem><para>2 indicates a runtime error, such as the failure
to open a file.</para></listitem>
</itemizedlist>
</para>
</refsect1>
<refsect1>
<title>Bugs</title>
<para>