summaryrefslogtreecommitdiff
path: root/Servers/SystemServer/main.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-21 20:50:06 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-21 20:50:06 +0200
commit8d550c174edad68726b8e9c3cd5cd950bf1bf16a (patch)
tree2c6ed4bd36844e7df4bfc787ea6b23d71902f346 /Servers/SystemServer/main.cpp
parent31b38ed88f3db123c498379f4615d2dce1ded406 (diff)
downloadserenity-8d550c174edad68726b8e9c3cd5cd950bf1bf16a.zip
LibCore: Convert CFile to ObjectPtr
Diffstat (limited to 'Servers/SystemServer/main.cpp')
-rw-r--r--Servers/SystemServer/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Servers/SystemServer/main.cpp b/Servers/SystemServer/main.cpp
index a70d70bbd1..68974780c6 100644
--- a/Servers/SystemServer/main.cpp
+++ b/Servers/SystemServer/main.cpp
@@ -58,12 +58,12 @@ void start_process(const String& program, const Vector<String>& arguments, int p
static void check_for_test_mode()
{
- CFile f("/proc/cmdline");
- if (!f.open(CIODevice::ReadOnly)) {
- dbg() << "Failed to read command line: " << f.error_string();
+ auto f = CFile::construct("/proc/cmdline");
+ if (!f->open(CIODevice::ReadOnly)) {
+ dbg() << "Failed to read command line: " << f->error_string();
ASSERT(false);
}
- const String cmd = String::copy(f.read_all());
+ const String cmd = String::copy(f->read_all());
dbg() << "Read command line: " << cmd;
if (cmd.matches("*testmode=1*")) {
// Eventually, we should run a test binary and wait for it to finish