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

Commit 04021270 authored by Tom Cherry's avatar Tom Cherry Committed by Gerrit Code Review
Browse files

Merge "init: create android::init:: namespace"

parents 45b4fe45 81f5d3eb
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,9 @@


using android::base::Join;
using android::base::Join;


namespace android {
namespace init {

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


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

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


namespace android {
namespace init {

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


}  // namespace init
}  // namespace android

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


namespace android {
namespace init {

static std::thread* g_bootcharting_thread;
static std::thread* g_bootcharting_thread;


static std::mutex g_bootcharting_finished_mutex;
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();
  if (args[1] == "start") return do_bootchart_start();
  return do_bootchart_stop();
  return do_bootchart_stop();
}
}

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


namespace android {
namespace init {

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


}  // namespace init
}  // namespace android

#endif /* _BOOTCHART_H */
#endif /* _BOOTCHART_H */
+6 −0
Original line number Original line 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
#define chmod DO_NOT_USE_CHMOD_USE_FCHMODAT_SYMLINK_NOFOLLOW


namespace android {
namespace init {

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


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

}  // namespace init
}  // namespace android
Loading