]>
Commit | Line | Data |
---|---|---|
f427ee49 A |
1 | #include <darwintest.h> |
2 | #include <sys/sysctl.h> | |
3 | ||
4 | T_DECL(sysctl_hw_target_product, "ensure the hw.target and hw.product sysctls exist") | |
5 | { | |
6 | char buffer[64] = ""; | |
7 | size_t buffer_size = sizeof(buffer); | |
8 | ||
9 | int ret = sysctlbyname("hw.target", buffer, | |
10 | &buffer_size, NULL, 0); | |
11 | T_ASSERT_POSIX_SUCCESS(ret, "hw.target sysctl"); | |
12 | T_LOG("hw.target = %s", buffer); | |
13 | ||
14 | buffer_size = sizeof(buffer); | |
15 | ||
16 | ret = sysctlbyname("hw.product", buffer, | |
17 | &buffer_size, NULL, 0); | |
18 | T_ASSERT_POSIX_SUCCESS(ret, "hw.product sysctl"); | |
19 | T_LOG("hw.product = %s", buffer); | |
20 | } |