Commit c025a41e7f67c88958f622544f1045bd18a482c3

Stefan Sperling 2018-04-02T13:55:21

add an error reporting imsg

diff --git a/lib/got_lib_privsep.h b/lib/got_lib_privsep.h
index 876853c..19198ae 100644
--- a/lib/got_lib_privsep.h
+++ b/lib/got_lib_privsep.h
@@ -28,6 +28,9 @@
  */
 
 enum got_imsg_type {
+	/* An error occured while processing a request. */
+	GOT_IMSG_ERROR,
+
 	/*
 	 * Messages concerned with read access to objects in a repository.
 	 * Object and pack files are opened by the main process, where
@@ -53,6 +56,11 @@ enum got_imsg_type {
 	GOT_IMSG_READ_PACKED_COMMIT_OBJECT_REPLY
 };
 
+/* Structure for GOT_IMSG_ERROR. */
+struct got_imsg_error {
+	int code; /* an error code from got_error.h */
+};
+
 /* Structure for GOT_IMSG_READ_LOOSE_OBJECT_HEADER_REQUEST data. */
 struct got_imsg_read_loose_object_header_request {
 	/*