File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ DeviceInfo getDeviceInfo(void) {
3737
3838 NSDictionary *platform = getServiceProperties (IOServiceMatching (" IOPlatformExpertDevice" ));
3939 if (platform) {
40- info.found = true ;
4140 info.modelIdentifier = copyStringProperty (platform, @" model" );
4241 info.serialNumber = copyStringProperty (platform, @" IOPlatformSerialNumber" );
4342
@@ -57,6 +56,9 @@ DeviceInfo getDeviceInfo(void) {
5756 if (product) {
5857 info.productName = copyStringProperty (product, @" product-name" );
5958 }
59+ if (!product || !info.productName ) {
60+ info.productName = strdup (info.modelIdentifier );
61+ }
6062
6163 return info;
6264 }
Original file line number Diff line number Diff line change 44#include <stdbool.h>
55
66typedef struct {
7- bool found ;
87 char * modelIdentifier ;
98 char * modelNumber ;
109 char * productName ;
You can’t perform that action at this time.
0 commit comments