summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/system.h8
-rw-r--r--include/version.h7
2 files changed, 13 insertions, 2 deletions
diff --git a/include/system.h b/include/system.h
index b215dadbf4..a5579e5cfe 100644
--- a/include/system.h
+++ b/include/system.h
@@ -200,6 +200,14 @@ int system_run_image_copy(enum system_image_copy_t copy);
int32_t system_get_rollback_version(enum system_image_copy_t copy);
/**
+ * Get the image data of an image
+ *
+ * @param copy Image copy to get the version of.
+ * @return Image data
+ */
+const struct image_data *system_get_image_data(enum system_image_copy_t copy);
+
+/**
* Get the version string for an image
*
* @param copy Image copy to get version from, or SYSTEM_IMAGE_UNKNOWN
diff --git a/include/version.h b/include/version.h
index d11ac7d9d9..71e215c8e2 100644
--- a/include/version.h
+++ b/include/version.h
@@ -9,6 +9,7 @@
#define __CROS_EC_VERSION_H
#include "common.h"
+#include "system.h"
#define CROS_EC_IMAGE_DATA_COOKIE1 0xce778899
#define CROS_EC_IMAGE_DATA_COOKIE2 0xceaabbdd
@@ -27,7 +28,9 @@ extern const char __image_data_offset[];
extern const void *__image_size;
/**
- * Get the number of commits field from version string.
+ * Get the number of commits of an image
+ *
+ * @return Number of commits in integer or 0 on error
*/
-uint32_t ver_get_numcommits(void);
+int ver_get_num_commits(enum system_image_copy_t copy);
#endif /* __CROS_EC_VERSION_H */