summaryrefslogtreecommitdiff
path: root/include/expo.h
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-10-14 16:31:57 -0600
committerSimon Glass <[email protected]>2024-10-18 14:10:22 -0600
commitd8ff97ce91529263c9d82a4bc00e133822673ab0 (patch)
tree71fabfa0482695b180c160aab18e3f0f38550d21 /include/expo.h
parent89f4f33c447e4c17e43372e3e91525187c43f54e (diff)
expo: Use standard numbering for save and discard
Set aside some expo IDs for 'save' and 'discard' buttons. This avoids needing to store the IDs for these. Adjust the documentation and expo tool for the new EXPOID_BASE_ID value. Ignore these objects when saving and loading the cedit, since they do not contain real data. Adjust 'cedit run' to return failure when the user exits the expo without saving. Update the test for this change as well. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/expo.h')
-rw-r--r--include/expo.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/expo.h b/include/expo.h
index 50e11cd118c..d6e2ccee41b 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -16,6 +16,26 @@ struct udevice;
#include <cli.h>
/**
+ * enum expo_id_t - standard expo IDs
+ *
+ * These are assumed to be in use at all times. Expos should use IDs starting
+ * from EXPOID_BASE_ID,
+ *
+ * @EXPOID_NONE: Not used, invalid ID 0
+ * @EXPOID_SAVE: User has requested that the expo data be saved
+ * @EXPOID_DISCARD: User has requested that the expo data be discarded
+ * @EXPOID_BASE_ID: First ID which can be used for expo objects
+ */
+enum expo_id_t {
+ EXPOID_NONE,
+
+ EXPOID_SAVE,
+ EXPOID_DISCARD,
+
+ EXPOID_BASE_ID = 5,
+};
+
+/**
* enum expoact_type - types of actions reported by the expo
*
* @EXPOACT_NONE: no action