summaryrefslogtreecommitdiffstats
path: root/src/include/usr/example/examplerc.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/example/examplerc.H')
-rw-r--r--src/include/usr/example/examplerc.H33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/usr/example/examplerc.H b/src/include/usr/example/examplerc.H
new file mode 100644
index 000000000..9e65d3515
--- /dev/null
+++ b/src/include/usr/example/examplerc.H
@@ -0,0 +1,33 @@
+// This file is an example how you create a reason code to pass in an
+// error log creation
+
+#ifndef __EXAMPLE_RC_H
+#define __EXAMPLE_RC_H
+
+#include <hbotcompid.H>
+
+// The definitions in this file is an example that shows how to define
+// reason codes. Each Host Boot component should have a service code
+// file (<component>servicecodes.H) that defines its module IDs and
+// unique reason codes.
+// See errlservicecodes.H for example of this file for ERRL component.
+
+// Below is an example of defining reason codes
+enum myModuleId
+{
+ MY_MODULE_ID_1 = 0x00,
+ //........
+ MY_LAST_MODULE_ID = 0xFF
+};
+
+// This enum definition should be in an .H file in your component area.
+// MY_COMPONENT_ID is your component name defined in hbotcompid.H file
+// included above.
+enum myReasonCode
+{
+ MY_REASON_CODE_1 = MY_COMP_ID | 0x01,
+ //........
+ ERRL_LAST_REASON_CODE = MY_COMP_ID | 0xFF
+};
+
+#endif
OpenPOWER on IntegriCloud