//
//  HardwareInfo.m
//
//

#import "HardwareInfo.h"
//#include <sys/types.h>
#include <sys/sysctl.h>

@implementation HardwareInfo

+ (NSString *)hardwareString {
	size_t size = 100;
	int name[] = {CTL_HW,HW_MACHINE};
	sysctl(name, 2, NULL, &size, NULL, 0);
	char *hw_machine = malloc(size);
	sysctl(name, 2, hw_machine, &size, NULL, 0);
	NSString *hardware = [NSString stringWithUTF8String:hw_machine];
	free(hw_machine);
	return hardware;
}

@end
