diff options
author | 諏訪子 <suwako@076.moe> | 2024-06-19 16:32:14 +0900 |
---|---|---|
committer | 諏訪子 <suwako@076.moe> | 2024-06-19 16:32:14 +0900 |
commit | 4090a27746074d7cf7ef72b0faa327bf295d8d98 (patch) | |
tree | 12b12dcc9178e1dfb9be7888a6b79f01a22a74d7 /src | |
parent | 77aae06e6ce61ed2e8d67870195af6b892fd7529 (diff) |
OpenBSD: サーバーでもGPU情報を確認する様に(現在Intelのみ)
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -41,7 +41,10 @@ const char *run_gpu_command(const char *command) { } const char *display_gpu() { -#if defined(__FreeBSD__) || defined(__DragonFly__) +#if defined(__OpenBSD__) + return run_gpu_command("dmesg | grep -i graphics | sed 's/^.* \"//' | " + "sed 's/\".*$//'"); +#elif defined(__FreeBSD__) || defined(__DragonFly__) return run_gpu_command("pciconf -lv | grep -B 4 -F \"VGA\" | " "grep -F \"device\" | sed 's/^.* device//' | " "sed \"s/^.* '//\" | sed \"s/'//\" | tail -1 | " |