[v0.96] Fix AMD ASCII art. Add third digit in frequency output

This commit is contained in:
Dr-Noob
2021-03-31 11:03:54 +02:00
parent 2f61ebd35a
commit 8abbd8f69f
3 changed files with 10 additions and 10 deletions

View File

@@ -13,9 +13,9 @@
\
@@@@ @@@ @@@ @@@@@@@@ ############ \
@@@@@@ @@@@@ @@@@@ @@@ @@@ ########## \
@@@ @@@ @@@@@@@@@@@@@ @@@ @@ # #### \
@@@ @@@ @@@ @@@ @@@ @@@ @@@ ### #### \
@@@@@@@@@@@@ @@@ @@@ @@@ @@@ #### ## ### \
@@@ @@@ @@@@@@@@@@@@@ @@@ @@ # ##### \
@@@ @@@ @@@ @@@ @@@ @@@ @@ ### ##### \
@@@@@@@@@@@@ @@@ @@@ @@@ @@@ ######### ### \
@@@ @@@ @@@ @@@ @@@@@@@@@ ######## ## \
\
\

View File

@@ -147,7 +147,7 @@ char* get_str_l3(struct cache* cach) {
char* get_str_freq(struct frequency* freq) {
//Max 3 digits and 3 for '(M/G)Hz' plus 1 for '\0'
uint32_t size = (4+3+1);
uint32_t size = (5+1+3+1);
assert(strlen(STRING_UNKNOWN)+1 <= size);
char* string = malloc(sizeof(char)*size);
memset(string, 0, sizeof(char)*size);
@@ -155,7 +155,7 @@ char* get_str_freq(struct frequency* freq) {
if(freq->max == UNKNOWN_FREQ || freq->max < 0)
snprintf(string,strlen(STRING_UNKNOWN)+1,STRING_UNKNOWN);
else if(freq->max >= 1000)
snprintf(string,size,"%.2f"STRING_GIGAHERZ,(float)(freq->max)/1000);
snprintf(string,size,"%.3f "STRING_GIGAHERZ,(float)(freq->max)/1000);
else
snprintf(string,size,"%d "STRING_MEGAHERZ,freq->max);

View File

@@ -13,7 +13,7 @@
#include "../arm/midr.h"
#endif
static const char* VERSION = "0.95";
static const char* VERSION = "0.96";
void print_help(char *argv[]) {
printf("Usage: %s [--version] [--help] [--debug] [--style \"fancy\"|\"retro\"|\"legacy\"] [--color \"intel\"|\"amd\"|'R,G,B:R,G,B:R,G,B:R,G,B']\n\n", argv[0]);