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
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index 476392e..e29d90d 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -576,11 +576,6 @@
     return 0;
 }
 
-// DEPRECATED: will be removed once device-specific implementations use dumpFile
-int dump_file(const char *title, const char *path) {
-    return ds.DumpFile(title, path);
-}
-
 int Dumpstate::DumpFile(const std::string& title, const std::string& path) {
     DurationReporter durationReporter(title);
     int fd = TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_NONBLOCK | O_CLOEXEC));
@@ -748,24 +743,6 @@
     return true;
 }
 
-// DEPRECATED: will be removed once device-specific implementations use RunCommand
-int run_command(const char* title, int timeout_seconds, const char* command, ...) {
-    std::vector<std::string> fullCommand = {command};
-    size_t arg;
-    va_list ap;
-    va_start(ap, command);
-    for (arg = 0; arg < MAX_ARGS_ARRAY_SIZE; ++arg) {
-        const char* ptr = va_arg(ap, const char*);
-        if (ptr == nullptr) {
-            break;
-        }
-        fullCommand.push_back(ptr);
-    }
-    va_end(ap);
-
-    return ds.RunCommand(title, fullCommand, CommandOptions::WithTimeout(timeout_seconds).Build());
-}
-
 int Dumpstate::RunCommand(const std::string& title, const std::vector<std::string>& fullCommand,
                           const CommandOptions& options) {
     if (fullCommand.empty()) {
@@ -1271,7 +1248,7 @@
     DurationReporter duration_reporter("DUMP ROUTE TABLES");
     if (is_dry_run()) return;
     const char* const RT_TABLES_PATH = "/data/misc/net/rt_tables";
-    dump_file("RT_TABLES", RT_TABLES_PATH);
+    ds.DumpFile("RT_TABLES", RT_TABLES_PATH);
     FILE* fp = fopen(RT_TABLES_PATH, "re");
     if (!fp) {
         printf("*** %s: %s\n", RT_TABLES_PATH, strerror(errno));