diff options
author | 諏訪子 <suwako@076.moe> | 2024-06-18 00:44:43 +0900 |
---|---|---|
committer | 諏訪子 <suwako@076.moe> | 2024-06-18 00:44:43 +0900 |
commit | 34dd561cf893cc54854978c016254398bf84b83e (patch) | |
tree | 21ffaf3939b4f8650f0f85b0bf7bbbee7ff6e9f6 | |
parent | 759ca0074f7275b0bd1e58bc88ad2779035c9fb8 (diff) |
それもあるのか・・・
-rw-r--r-- | main.c | 4 | ||||
-rw-r--r-- | src/host.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -17,7 +17,11 @@ int main() { display_user_name(); printf("@"); display_user_host(); +#ifdef __NetBSD__ printf("\n------------------\n"); +#else + printf("------------------\n"); +#endif printf("OS: "); display_os_name(); @@ -29,7 +29,9 @@ void run_command(const char *command) { void display_host_model() { #if defined(__OpenBSD__) || defined(__FreeBSD__) || \ defined(__DragonFly__) - run_command("sysctl -n hw.vendor hw.product"); + run_command("sysctl -n hw.vendor && echo \" \" && " + "sysctl -n hw.version && echo \" \" &&" + "sysctl -n hw.product"); #elif defined(__NetBSD__) run_command("sysctl -n machdep.dmi.system-vendor && " "echo \" \" && sysctl -n machdep.dmi.system-version && " |