mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-08 06:41:58 +00:00
Plenty of bugfixes for Linux kernel later than 3.5 and Ubuntu later than 10.10. More organized code to improve portability. Regression tests for Pal to test completeness of implementation.
25 lines
548 B
C
25 lines
548 B
C
/* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
|
|
/* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
|
|
|
|
#define _GNU_SOURCE
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
|
|
int main (int argc, char ** argv)
|
|
{
|
|
FILE * cpuinfo = fopen("/proc/cpuinfo", "rb");
|
|
char * arg = 0;
|
|
size_t size = 0;
|
|
|
|
if (!cpuinfo)
|
|
return errno;
|
|
|
|
while(getdelim(&arg, &size, 0, cpuinfo) != -1)
|
|
puts(arg);
|
|
|
|
free(arg);
|
|
fclose(cpuinfo);
|
|
return 0;
|
|
}
|