1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 05:25:09 +00:00

LibCore: Convert CFile to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 20:50:06 +02:00
parent 31b38ed88f
commit 8d550c174e
30 changed files with 135 additions and 134 deletions

View file

@ -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