brew/Library/Homebrew/hw.model.c
Max Howell 4d63b87e0a Change license to BSD
I confirmed this change with all relevant contributors first.
2009-08-31 16:09:17 +01:00

18 lines
407 B
C

/*
This software is in the public domain, furnished "as is", without technical
support, and with no warranty, express or implied, as to its usefulness for
any purpose.
*/
#include <sys/sysctl.h>
#include <stdio.h>
int main()
{
char buf[32];
size_t sz = sizeof(buf);
int r = sysctlbyname("hw.model", buf, &sz, NULL, 0);
if (r == 0)
printf("%.*s", sz, buf);
return r;
}