diff --git a/cpufetch.8 b/cpufetch.8 index 761c6f9..abcb540 100644 --- a/cpufetch.8 +++ b/cpufetch.8 @@ -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 diff --git a/src/common/args.c b/src/common/args.c index ff33b1c..4359a47 100644 --- a/src/common/args.c +++ b/src/common/args.c @@ -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] }, diff --git a/src/common/main.c b/src/common/main.c index 96d9667..473bfdd 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -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])), "");