[Pkg-libvirt-commits] [libguestfs] 03/26: mllib: Allow exit code to be specified when calling 'error' function.
Hilko Bengen
bengen at moszumanska.debian.org
Thu Mar 20 23:06:08 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.25.46
in repository libguestfs.
commit 5e1fc4640dc369221e5e37013c9f9c7c065bbb8b
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Mar 17 12:21:39 2014 +0000
mllib: Allow exit code to be specified when calling 'error' function.
---
mllib/common_utils.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index de3bd40..094ef10 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -187,7 +187,7 @@ let make_message_function ~quiet fs =
in
ksprintf p fs
-let error ~prog fs =
+let error ~prog ?(exit_code = 1) fs =
let display str =
wrap ~chan:stderr (sprintf (f_"%s: error: %s") prog str);
prerr_newline ();
@@ -196,7 +196,7 @@ let error ~prog fs =
(sprintf (f_"%s: If reporting bugs, run %s with debugging enabled (-v) and include the complete output.")
prog prog);
prerr_newline ();
- exit 1
+ exit exit_code
in
ksprintf display fs
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list