init: Introduce symbolic names for certain constants
Make the code easier to read by introducing symbolic names for the
constants used by Service::Start() for communication between the parent
and child processes.
Bug: 213617178
Change-Id: I3e735e149682fa9df2ed57f75eb5a67d7c68bd92
Signed-off-by: Bart Van Assche <bvanassche@google.com>
diff --git a/init/service_utils.h b/init/service_utils.h
index 65a2012..228ae2b 100644
--- a/init/service_utils.h
+++ b/init/service_utils.h
@@ -32,6 +32,12 @@
namespace android {
namespace init {
+// Constants used by Service::Start() for communication between parent and child.
+enum ServiceCode : uint8_t {
+ kActivatingCgroupsFailed,
+ kCgroupsActivated,
+};
+
class Descriptor {
public:
Descriptor(const std::string& name, android::base::unique_fd fd)