Skip to content

Commit

Permalink
Cpu name fix (ad-oliviero#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
dqnk committed Mar 16, 2021
1 parent ce5f37f commit f290806
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build: uwufetch.c
debug:
clear
gcc $(FLAGS_DEBUG) -o $(NAME) $(FILES)
./uwufetch -d raspbian
./uwufetch

install:
cp $(NAME) $(INSTALL_DIR)$(NAME)
Expand Down
4 changes: 2 additions & 2 deletions uwufetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void get_info() { // get all necessary info
sscanf(line, "\nID=%s", version_name);
if (strlen(version_name)) break;
}
while (fgets(line, sizeof(line), cpuinfo)) if (fscanf(cpuinfo, "model name : %[^with\n]", cpu_model)) break;
while (fgets(line, sizeof(line), cpuinfo)) if (sscanf(line, "model name : %[^\n]", cpu_model)) break;
sprintf(user, "%s", getenv("USER"));
fclose(os_release);
} else { // try for android vars, or unknown system
Expand Down Expand Up @@ -397,7 +397,7 @@ void usage(char* arg) {
" -h, --help prints this help page\n"
" -i, --image prints logo as image\n"
" %sworks in most terminals\n"
" read res/IMAGES.md for more info%s\n",
" read res/IMAGES.md for more info%s\n"
" -l lists all supported distributions\n",
arg, BLUE, NORMAL);
}
Expand Down

0 comments on commit f290806

Please sign in to comment.