summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-22 05:09:27 +0900
committer諏訪子 <suwako@076.moe>2024-06-22 05:09:27 +0900
commit17341db8b3d73193e0b4ac8ae0c2a984d4ce10e7 (patch)
tree84409aa58311893f95a2af78893e5a13e5857200
parent87512412cc7c938f48eac8c7d6e72f9834299569 (diff)
SunOS: GPUの情報
-rw-r--r--src/gpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu.c b/src/gpu.c
index fa01547..3447ae9 100644
--- a/src/gpu.c
+++ b/src/gpu.c
@@ -49,6 +49,12 @@ const char *display_gpu() {
"grep -F \"device\" | sed 's/^.* device//' | "
"sed \"s/^.* '//\" | sed \"s/'//\" | tail -1 | "
"sed 's/ Core Processor Integrated Graphics Controller//'");
+#elif defined(__sun)
+ return run_command_s("prtconf -v | grep -A 30 \"value='display'\" | "
+ "grep -A 1 vendor-name | tail -1 | sed 's/^.*value=//' | sed \"s/'//g\" | "
+ "sed 's/ Corporation//' && echo \" \" && prtconf -v | "
+ "grep -A 30 \"value='display'\" | grep -A 1 device-name | tail -1 | "
+ "sed 's/^.*value=//' | sed \"s/'//g\"");
#elif defined(__linux__)
return run_command_s("lspci | grep VGA | sed 's/^.*: //' | "
"sed 's/Corporation //' | sed 's/ (.*$//' | "