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:
parent
31b38ed88f
commit
8d550c174e
30 changed files with 135 additions and 134 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue