diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-21 20:50:06 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-21 20:50:06 +0200 |
commit | 8d550c174edad68726b8e9c3cd5cd950bf1bf16a (patch) | |
tree | 2c6ed4bd36844e7df4bfc787ea6b23d71902f346 /Userland/dmesg.cpp | |
parent | 31b38ed88f3db123c498379f4615d2dce1ded406 (diff) | |
download | serenity-8d550c174edad68726b8e9c3cd5cd950bf1bf16a.zip |
LibCore: Convert CFile to ObjectPtr
Diffstat (limited to 'Userland/dmesg.cpp')
-rw-r--r-- | Userland/dmesg.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/dmesg.cpp b/Userland/dmesg.cpp index bc558815fc..afe90b1b0b 100644 --- a/Userland/dmesg.cpp +++ b/Userland/dmesg.cpp @@ -8,12 +8,12 @@ int main(int argc, char** argv) { (void)argc; (void)argv; - CFile f("/proc/dmesg"); - if (!f.open(CIODevice::ReadOnly)) { - fprintf(stderr, "open: failed to open /proc/dmesg: %s", f.error_string()); + 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(); + const auto& b = f->read_all(); for (auto i = 0; i < b.size(); ++i) putchar(b[i]); return 0; |