summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-03-02 07:42:44 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-03-02 07:42:44 +0000
commit5453cf333745418a641374e19fd968519fd7de30 (patch)
tree63baf0f216f814ed9653563f90139101cd370d94
parent6fe3b5f900679d28e844757af7abce501dde6246 (diff)
downloadvirt-what-5453cf333745418a641374e19fd968519fd7de30.tar.gz
virt-what-5453cf333745418a641374e19fd968519fd7de30.tar.xz
virt-what-5453cf333745418a641374e19fd968519fd7de30.zip
docs: Document the exit status of the script.
-rw-r--r--virt-what.pod16
1 files changed, 16 insertions, 0 deletions
diff --git a/virt-what.pod b/virt-what.pod
index 0a724d4..156406e 100644
--- a/virt-what.pod
+++ b/virt-what.pod
@@ -163,6 +163,22 @@ Status: confirmed by RWMJ
=back
+=head1 EXIT STATUS
+
+Programs that use or wrap C<virt-what> should check that the exit
+status is 0 before they attempt to parse the output of the command.
+
+A non-zero exit status indicates some error, for example, an
+unrecognized command line argument. If the exit status is non-zero
+then the output "facts" (if any were printed) cannot be guaranteed and
+should be ignored.
+
+The exit status does I<not> have anything to do with whether the
+program is running on baremetal or under virtualization, nor with
+whether C<virt-what> managed detection "correctly" (which is basically
+unknowable given the large variety of virtualization systems out there
+and that some systems deliberately emulate others).
+
=head1 IMPORTANT NOTE
Most of the time, using this program is the I<wrong> thing to do.