Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c7fe8fe5 authored by Felipe Leme's avatar Felipe Leme
Browse files

Deprecate run_command() and dump_file().

This change will break dumpstate_board() implementations that were not
refactored to use the equivalent functions in the Dumpstate
class. For example:

void dumpstate_board() {
  dump_file("INTERRUPTS", "/proc/interrupts");
  run_command("SUBSYSTEM TOMBSTONES", 5, SU_PATH, "root",
              "ls", "-l", "/data/tombstones/ramdump", NULL);

}

Should be refactored to:

void dumpstate_board(){
  Dumpstate& ds = Dumpstate::GetInstance();

  ds.DumpFile("INTERRUPTS", "/proc/interrupts");
  ds.RunCommand("SUBSYSTEM TOMBSTONES",
                {"ls", "-l", "/data/tombstones/ramdump"},
                CommandOptions::AS_ROOT_5);
}

BUG: 26379932
Test: manual / refactored code

Change-Id: Ia74515cc57abc18bc6966a5aed71dd679422fd0e
parent 4ae86b1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment