Skip to content

Commit

Permalink
src/mainboard/pcengines/apu2/romstage.c: add comment about date forma…
Browse files Browse the repository at this point in the history
…t change and fix order of months and days

Signed-off-by: Michał Żygowski <[email protected]>
  • Loading branch information
miczyg1 committed Oct 23, 2018
1 parent 904102b commit 7de39fa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mainboard/pcengines/apu2/romstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,16 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
bool scon = check_console();

if(scon){
/*
* coreboot_dmi_date is in format mm/dd/yyyy and should remain
* unchanged to conform SMBIOS specification
* Change the order of months, days and years only locally to
* get it printed in sign-of-life in format yyyymmdd
*/
char tmp[9];
strncpy(tmp, coreboot_dmi_date+6, 4);
strncpy(tmp+6, coreboot_dmi_date+3, 2);
strncpy(tmp+4, coreboot_dmi_date, 2);
strncpy(tmp+4, coreboot_dmi_date+3, 2);
strncpy(tmp+6, coreboot_dmi_date, 2);
tmp[8] = '\0';
printk(BIOS_ALERT, CONFIG_MAINBOARD_SMBIOS_MANUFACTURER " "
CONFIG_MAINBOARD_PART_NUMBER "\n");
Expand Down

0 comments on commit 7de39fa

Please sign in to comment.