diff options
author | 諏訪子 <suwako@076.moe> | 2024-06-19 23:52:56 +0900 |
---|---|---|
committer | 諏訪子 <suwako@076.moe> | 2024-06-19 23:52:56 +0900 |
commit | b6e3f6cb5d1051777c35988f201e6730525e3389 (patch) | |
tree | 98679f1995f7b103f3314ce54fdf0d1c76df6dbd /src/host.c | |
parent | 8f378429801162d690dc68c0f15b483c1d291838 (diff) |
掃除
Diffstat (limited to 'src/host.c')
-rw-r--r-- | src/host.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -6,8 +6,6 @@ #if defined(__linux__) #include <unistd.h> - -int skip = 0; #endif const char *run_host_command(const char *command) { @@ -38,8 +36,7 @@ const char *run_host_command(const char *command) { strstr(buf, "INVALID") != NULL || strstr(buf, "All Series") != NULL ) { - skip = 1; - break; + return NULL; } #endif @@ -113,7 +110,7 @@ void display_host_model() { if (cmd2) { const char *model = run_host_command(cmd2); - if (!skip) printf(" %s", model); + if (model) printf(" %s", model); } #elif defined(__APPLE__) printf("%s", run_host_command("sysctl -n hw.model")); |