mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
Little fixes
This commit is contained in:
@@ -27,7 +27,7 @@ Peak FLOPS: 512 GFLOP/s(in simple precision)
|
|||||||
|
|
||||||
static const char* VERSION = "0.49";
|
static const char* VERSION = "0.49";
|
||||||
|
|
||||||
void print_help(int argc, char *argv[]) {
|
void print_help(char *argv[]) {
|
||||||
printf("Usage: %s [--version] [--help] [--style STYLE]\n\
|
printf("Usage: %s [--version] [--help] [--style STYLE]\n\
|
||||||
Options: \n\
|
Options: \n\
|
||||||
--style Set logo style color\n\
|
--style Set logo style color\n\
|
||||||
@@ -49,7 +49,7 @@ int main(int argc, char* argv[]) {
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
if(show_help()) {
|
if(show_help()) {
|
||||||
print_help(argc, argv);
|
print_help(argv);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ void init_cpu_info(struct cpuInfo* cpu) {
|
|||||||
cpu->SHA = false;
|
cpu->SHA = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void get_cpu_vendor_internal(char* name, uint32_t eax,uint32_t ebx,uint32_t ecx,uint32_t edx) {
|
void get_cpu_vendor_internal(char* name, uint32_t ebx,uint32_t ecx,uint32_t edx) {
|
||||||
name[__COUNTER__] = ebx & MASK;
|
name[__COUNTER__] = ebx & MASK;
|
||||||
name[__COUNTER__] = (ebx>>8) & MASK;
|
name[__COUNTER__] = (ebx>>8) & MASK;
|
||||||
name[__COUNTER__] = (ebx>>16) & MASK;
|
name[__COUNTER__] = (ebx>>16) & MASK;
|
||||||
@@ -124,7 +124,7 @@ struct cpuInfo* get_cpu_info() {
|
|||||||
//Fill vendor
|
//Fill vendor
|
||||||
char name[13];
|
char name[13];
|
||||||
memset(name,0,13);
|
memset(name,0,13);
|
||||||
get_cpu_vendor_internal(name, eax,ebx,ecx,edx);
|
get_cpu_vendor_internal(name, ebx, ecx, edx);
|
||||||
|
|
||||||
if(strcmp(VENDOR_INTEL_STRING,name) == 0)
|
if(strcmp(VENDOR_INTEL_STRING,name) == 0)
|
||||||
cpu->cpu_vendor = VENDOR_INTEL;
|
cpu->cpu_vendor = VENDOR_INTEL;
|
||||||
|
|||||||
Reference in New Issue
Block a user