exosphere: add new ConfigItem which allows the caller to retrieve the git commit hash. (#493)

This commit is contained in:
thedax
2019-03-29 18:16:03 -04:00
committed by SciresM
parent 81aa5c7ec7
commit fd4d6a4e55
3 changed files with 7 additions and 1 deletions

View File

@@ -260,6 +260,10 @@ uint32_t configitem_get(bool privileged, ConfigItem item, uint64_t *p_outvalue)
/* UNOFFICIAL: The fact that we are executing means we aren't in the process of shutting down. */
*p_outvalue = 0;
break;
case CONFIGITEM_EXOSPHERE_VERHASH:
/* UNOFFICIAL: Gets information about the current exosphere git commit hash. */
*p_outvalue = ATMOSPHERE_RELEASE_VERSION_HASH;
break;
default:
result = 2;
break;

View File

@@ -43,6 +43,7 @@ typedef enum {
CONFIGITEM_EXOSPHERE_VERSION = 65000,
CONFIGITEM_NEEDS_REBOOT = 65001,
CONFIGITEM_NEEDS_SHUTDOWN = 65002,
CONFIGITEM_EXOSPHERE_VERHASH = 65003,
} ConfigItem;
#define REBOOT_KIND_NO_REBOOT 0