2019-06-07 11:49:31 +02:00
|
|
|
#include <LibCore/CFile.h>
|
|
|
|
#include <fcntl.h>
|
2018-11-17 15:56:09 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
2018-10-23 11:57:38 +02:00
|
|
|
|
2018-11-09 10:18:04 +01:00
|
|
|
int main(int argc, char** argv)
|
2018-10-23 11:57:38 +02:00
|
|
|
{
|
2019-06-07 11:49:31 +02:00
|
|
|
(void)argc;
|
|
|
|
(void)argv;
|
2019-06-02 12:07:24 +02:00
|
|
|
|
|
|
|
CFile f("/proc/summary");
|
|
|
|
if (!f.open(CIODevice::ReadOnly)) {
|
|
|
|
fprintf(stderr, "open: failed to open /proc/summary: %s", f.error_string());
|
2018-10-23 11:57:38 +02:00
|
|
|
return 1;
|
|
|
|
}
|
2019-06-02 12:07:24 +02:00
|
|
|
const auto& b = f.read_all();
|
|
|
|
for (auto i = 0; i < b.size(); ++i)
|
|
|
|
putchar(b[i]);
|
2018-10-23 11:57:38 +02:00
|
|
|
return 0;
|
|
|
|
}
|