Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: fafbbbea79
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (16 sloc) 0.407 kB
/*
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;
}
Jump to Line
Something went wrong with that request. Please try again.