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

Commit 6b6d4834 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "init: create android::init:: namespace" am: 04021270 am: d3d79b21 am: b57e1180

am: 99d93f44

Change-Id: If8efbff1df7bead15a9f3c595e63390d9786dde7
parents e8bd9e88 99d93f44
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -24,6 +24,9 @@

using android::base::Join;

namespace android {
namespace init {

Command::Command(BuiltinFunction f, const std::vector<std::string>& args, int line)
    : func_(f), args_(args), line_(line) {}

@@ -349,3 +352,6 @@ void ActionParser::EndSection() {
        action_manager_->AddAction(std::move(action_));
    }
}

}  // namespace init
}  // namespace android
+6 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@
#include "init_parser.h"
#include "keyword_map.h"

namespace android {
namespace init {

class Command {
  public:
    Command(BuiltinFunction f, const std::vector<std::string>& args, int line);
@@ -126,4 +129,7 @@ class ActionParser : public SectionParser {
    std::unique_ptr<Action> action_;
};

}  // namespace init
}  // namespace android

#endif
+6 −0
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@
using android::base::StringPrintf;
using namespace std::chrono_literals;

namespace android {
namespace init {

static std::thread* g_bootcharting_thread;

static std::mutex g_bootcharting_finished_mutex;
@@ -192,3 +195,6 @@ int do_bootchart(const std::vector<std::string>& args) {
  if (args[1] == "start") return do_bootchart_start();
  return do_bootchart_stop();
}

}  // namespace init
}  // namespace android
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,12 @@
#include <string>
#include <vector>

namespace android {
namespace init {

int do_bootchart(const std::vector<std::string>& args);

}  // namespace init
}  // namespace android

#endif /* _BOOTCHART_H */
+6 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ using namespace std::literals::string_literals;

#define chmod DO_NOT_USE_CHMOD_USE_FCHMODAT_SYMLINK_NOFOLLOW

namespace android {
namespace init {

static constexpr std::chrono::nanoseconds kCommandRetryTimeout = 5s;

static int insmod(const char *filename, const char *options, int flags) {
@@ -941,3 +944,6 @@ const BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const {
    // clang-format on
    return builtin_functions;
}

}  // namespace init
}  // namespace android
Loading