2
0
mirror of https://github.com/Dr-Noob/cpufetch synced 2025-08-30 05:48:15 +00:00

[v0.97] Add raw option to help. Disable raw option in ARM

This commit is contained in:
Dr-Noob 2021-04-09 15:58:33 +02:00
parent ec5f80adc1
commit b45c09efff
3 changed files with 17 additions and 4 deletions

View File

@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.2.
.TH CPUFETCH "1" "March 2021" "cpufetch v0.96 (x86_64 build)" "User Commands"
.TH CPUFETCH "1" "March 2021" "cpufetch v0.97 (x86_64 build)" "User Commands"
.SH NAME
cpufetch \- manual page for cpufetch v0.96 (x86_64 build)
cpufetch \- manual page for cpufetch v0.97 (x86_64 build)
.SH SYNOPSIS
.B cpufetch
[\fI\,OPTION\/\fR]...
@ -21,6 +21,9 @@ Prints CPU model and cpuid levels (debug purposes)
\fB\-v\fR, \fB\-\-verbose\fR
Prints extra information (if available) about how cpufetch tried fetching information
.TP
\fB\-r\fR, \fB\-\-raw\fR
Prints raw cpuid data
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints this help and exit
.TP

View File

@ -189,8 +189,13 @@ char* build_short_options() {
char* str = (char *) malloc(sizeof(char) * (len*2 + 1));
memset(str, 0, sizeof(char) * (len*2 + 1));
sprintf(str, "%c:%c:%c%c%c%c%c",
c[ARG_STYLE], c[ARG_COLOR], c[ARG_HELP], c[ARG_RAW],
#ifdef ARCH_X86
sprintf(str, "%c%c:%c:%c%c%c%c",
c[ARG_RAW],
#else
sprintf(str, "%c:%c:%c%c%c%c",
#endif
c[ARG_STYLE], c[ARG_COLOR], c[ARG_HELP],
c[ARG_DEBUG], c[ARG_VERBOSE], c[ARG_VERSION]);
return str;
@ -213,7 +218,9 @@ bool parse_args(int argc, char* argv[]) {
{args_str[ARG_STYLE], required_argument, 0, args_chr[ARG_STYLE] },
{args_str[ARG_COLOR], required_argument, 0, args_chr[ARG_COLOR] },
{args_str[ARG_HELP], no_argument, 0, args_chr[ARG_HELP] },
#ifdef ARCH_X86
{args_str[ARG_RAW], no_argument, 0, args_chr[ARG_RAW] },
#endif
{args_str[ARG_DEBUG], no_argument, 0, args_chr[ARG_DEBUG] },
{args_str[ARG_VERBOSE], no_argument, 0, args_chr[ARG_VERBOSE] },
{args_str[ARG_VERSION], no_argument, 0, args_chr[ARG_VERSION] },

View File

@ -33,6 +33,9 @@ void print_help(char *argv[]) {
printf(" -%c, --%s %*s Prints main ID register values for all cores (debug purposes)\n", c[ARG_DEBUG], t[ARG_DEBUG], (int) (max_len-strlen(t[ARG_DEBUG])), "");
#endif
printf(" -%c, --%s %*s Prints extra information (if available) about how cpufetch tried fetching information\n", c[ARG_VERBOSE], t[ARG_VERBOSE], (int) (max_len-strlen(t[ARG_VERBOSE])), "");
#ifdef ARCH_X86
printf(" -%c, --%s %*s Prints raw cpuid data\n", c[ARG_RAW], t[ARG_RAW], (int) (max_len-strlen(t[ARG_RAW])), "");
#endif
printf(" -%c, --%s %*s Prints this help and exit\n", c[ARG_HELP], t[ARG_HELP], (int) (max_len-strlen(t[ARG_HELP])), "");
printf(" -%c, --%s %*s Prints cpufetch version and exit\n", c[ARG_VERSION], t[ARG_VERSION], (int) (max_len-strlen(t[ARG_VERSION])), "");