mirror of
https://github.com/joel16/SwitchIdent.git
synced 2024-11-23 11:49:43 +00:00
Display DRAM desc instead of value
This commit is contained in:
parent
e4dfef790b
commit
6a456cba5b
@ -1,7 +1,7 @@
|
||||
#ifndef _SWITCHIDENT_KERNEL_H_
|
||||
#define _SWITCHIDENT_KERNEL_H_
|
||||
|
||||
u64 SwitchIdent_GetDramID(void);
|
||||
const char *SwitchIdent_GetDramDesc(void);
|
||||
const char *SwitchIdent_GetVersion(void);
|
||||
const char *SwitchIdent_GetHardwareType(void);
|
||||
const char *SwitchIdent_GetUnit(void);
|
||||
|
@ -14,15 +14,33 @@ static u64 SwitchIdent_GetPackage1MaxverConstant(void)
|
||||
return (version + 1); // (Package1 maxver constant - 1) + 1
|
||||
}
|
||||
|
||||
u64 SwitchIdent_GetDramID(void)
|
||||
const char *SwitchIdent_GetDramDesc(void)
|
||||
{
|
||||
Result ret = 0;
|
||||
u64 id = 0;
|
||||
|
||||
const char *dram_desc[] =
|
||||
{
|
||||
"EristaIcosaSamsung4gb",
|
||||
"EristaIcosaHynix4gb",
|
||||
"EristaIcosaMicron4gb",
|
||||
"Unknown",
|
||||
"EristaIcosaSamsung6gb",
|
||||
"Unknown",
|
||||
"Unknown",
|
||||
"MarikoIowax1x2Samsung4gb",
|
||||
"MarikoIowaSamsung4gb",
|
||||
"MarikoIowaSamsung8gb",
|
||||
"Unknown",
|
||||
"Unknown",
|
||||
"MarikoHoagSamsung4gb",
|
||||
"MarikoHoagSamsung8gb"
|
||||
};
|
||||
|
||||
if (R_FAILED(ret = splGetConfig(SplConfigItem_DramId, &id)))
|
||||
printf("splGetConfig(SplConfigItem_DramId) failed: 0x%x.\n\n", ret);
|
||||
|
||||
return id;
|
||||
return dram_desc[id];
|
||||
}
|
||||
|
||||
const char *SwitchIdent_GetVersion(void)
|
||||
|
@ -60,7 +60,7 @@ int main(int argc, char **argv)
|
||||
printf("\x1b[31;1m*\x1b[0m Hardware: \x1b[31;1m%s\x1b[0m (\x1b[31;1m%s\x1b[0m) \x1b[0m\n", SwitchIdent_GetHardwareType(), SwitchIdent_GetUnit());
|
||||
printf("\x1b[31;1m*\x1b[0m Serial number: \x1b[31;1m%s\n", SwitchIdent_GetSerialNumber());
|
||||
printf("\x1b[31;1m*\x1b[0m Device ID: \x1b[31;1m%llu\n", SwitchIdent_GetDeviceID());
|
||||
printf("\x1b[31;1m*\x1b[0m DRAM ID: \x1b[31;1m%llu\n\n", SwitchIdent_GetDramID());
|
||||
printf("\x1b[31;1m*\x1b[0m DRAM ID: \x1b[31;1m%s\n\n", SwitchIdent_GetDramDesc());
|
||||
|
||||
/*
|
||||
System info:
|
||||
|
Loading…
Reference in New Issue
Block a user