Skip to content

Commit d670ae4

Browse files
committed
fix: gpustack fix mac uuid
1 parent 09aab29 commit d670ae4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/detection/gpu/gpu_apple.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@
4646
gpu->index = (uint8_t)device.locationNumber;
4747
#endif
4848

49+
int registryID_string_length = snprintf(NULL, 0, "%llu", device.registryID);
50+
if (registryID_string_length > 0) {
51+
size_t registryID_buffer_size = (size_t)registryID_string_length + 1;
52+
char *registryID_buffer = (char *)malloc(registryID_buffer_size);
53+
snprintf(registryID_buffer, registryID_buffer_size, "%llu", device.registryID);
54+
ffStrbufAppendS(&gpu->uuid, registryID_buffer);
55+
free(registryID_buffer);
56+
}
57+
4958
if (gpu->type == FF_GPU_TYPE_INTEGRATED)
5059
{
5160
gpu->shared.total = device.recommendedMaxWorkingSetSize;

0 commit comments

Comments
 (0)