mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-15 19:21:38 +00:00
20 lines
481 B
C++
20 lines
481 B
C++
#include <LibCore/CFile.h>
|
|
#include <assert.h>
|
|
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
(void)argc;
|
|
(void)argv;
|
|
auto f = CFile::construct("/proc/dmesg");
|
|
if (!f->open(CIODevice::ReadOnly)) {
|
|
fprintf(stderr, "open: failed to open /proc/dmesg: %s", f->error_string());
|
|
return 1;
|
|
}
|
|
const auto& b = f->read_all();
|
|
for (auto i = 0; i < b.size(); ++i)
|
|
putchar(b[i]);
|
|
return 0;
|
|
}
|