Exosphere: Add API for retrieving versioning info.

This commit is contained in:
Michael Scire 2018-05-09 06:29:56 -06:00
parent bf94bf48d2
commit ba7d0c2cb6
6 changed files with 38 additions and 5 deletions

View file

@ -9,6 +9,7 @@
#include "utils.h"
#include "masterkey.h"
#include "exocfg.h"
#include "version.h"
static bool g_battery_profile = false;
@ -132,6 +133,10 @@ uint32_t configitem_get(ConfigItem item, uint64_t *p_outvalue) {
result = 2;
}
break;
case CONFIGITEM_EXOSPHERE_VERSION:
/* UNOFFICIAL: Gets information about the current exosphere version. */
*p_outvalue = (EXOSPHERE_RELEASE_VERSION_MAJOR << 24) | (EXOSPHERE_RELEASE_VERSION_MINOR << 16) | (exosphere_get_target_firmware() << 8) | (mkey_get_revision() << 0);
break;
default:
result = 2;
break;

View file

@ -21,7 +21,10 @@ typedef enum {
CONFIGITEM_ODM4BIT10_4X = 14,
CONFIGITEM_NEWHARDWARETYPE_5X = 15,
CONFIGITEM_NEWKEYGENERATION_5X = 16,
CONFIGITEM_PACKAGE2HASH_5X = 17
CONFIGITEM_PACKAGE2HASH_5X = 17,
/* These are unofficial, for usage by Exosphere. */
CONFIGITEM_EXOSPHERE_VERSION = 65000
} ConfigItem;
uint32_t configitem_set(ConfigItem item, uint64_t value);

7
exosphere/src/version.h Normal file
View file

@ -0,0 +1,7 @@
#ifndef EXOSPHERE_VERSION_H
#define EXOSPHERE_VERSION_H
#define EXOSPHERE_RELEASE_VERSION_MAJOR 0
#define EXOSPHERE_RELEASE_VERSION_MINOR 1
#endif