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

Commit a7eb62c8 authored by Jooyung Han's avatar Jooyung Han Committed by Gerrit Code Review
Browse files

Merge "init: clean up unused Service[List]::post_data" into main

parents 14807185 148f602f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -636,7 +636,7 @@ provides the `aidl_lazy_test_1` interface.
  Properties are expanded within _level_.
  Properties are expanded within _level_.


`mark_post_data`
`mark_post_data`
> Used to mark the point right after /data is mounted.
> (This action is deprecated and no-op.)


`mkdir <path> [<mode>] [<owner>] [<group>] [encryption=<action>] [key=<key>]`
`mkdir <path> [<mode>] [<owner>] [<group>] [encryption=<action>] [key=<key>]`
> Create a directory at _path_, optionally with the given mode, owner, and
> Create a directory at _path_, optionally with the given mode, owner, and
+1 −2
Original line number Original line Diff line number Diff line
@@ -1171,8 +1171,7 @@ static Result<void> do_init_user0(const BuiltinArguments& args) {
}
}


static Result<void> do_mark_post_data(const BuiltinArguments& args) {
static Result<void> do_mark_post_data(const BuiltinArguments& args) {
    ServiceList::GetInstance().MarkPostData();
    LOG(INFO) << "deprecated action `mark_post_data` called.";

    return {};
    return {};
}
}


+0 −2
Original line number Original line Diff line number Diff line
@@ -653,8 +653,6 @@ Result<void> Service::Start() {
        SetMountNamespace();
        SetMountNamespace();
    }
    }


    post_data_ = ServiceList::GetInstance().IsPostData();

    LOG(INFO) << "starting service '" << name_ << "'...";
    LOG(INFO) << "starting service '" << name_ << "'...";


    std::vector<Descriptor> descriptors;
    std::vector<Descriptor> descriptors;
+0 −4
Original line number Original line Diff line number Diff line
@@ -144,8 +144,6 @@ class Service {
    std::optional<std::chrono::seconds> timeout_period() const { return timeout_period_; }
    std::optional<std::chrono::seconds> timeout_period() const { return timeout_period_; }
    const std::vector<std::string>& args() const { return args_; }
    const std::vector<std::string>& args() const { return args_; }
    bool is_updatable() const { return updatable_; }
    bool is_updatable() const { return updatable_; }
    bool is_post_data() const { return post_data_; }
    bool is_from_apex() const { return base::StartsWith(filename_, "/apex/"); }
    void set_oneshot(bool value) {
    void set_oneshot(bool value) {
        if (value) {
        if (value) {
            flags_ |= SVC_ONESHOT;
            flags_ |= SVC_ONESHOT;
@@ -244,8 +242,6 @@ class Service {


    std::optional<MountNamespace> mount_namespace_;
    std::optional<MountNamespace> mount_namespace_;


    bool post_data_ = false;

    std::optional<std::string> on_failure_reboot_target_;
    std::optional<std::string> on_failure_reboot_target_;


    std::string filename_;
    std::string filename_;
+0 −8
Original line number Original line Diff line number Diff line
@@ -68,14 +68,6 @@ void ServiceList::DumpState() const {
    }
    }
}
}


void ServiceList::MarkPostData() {
    post_data_ = true;
}

bool ServiceList::IsPostData() {
    return post_data_;
}

void ServiceList::StartDelayedServices() {
void ServiceList::StartDelayedServices() {
    for (const auto& name : delayed_service_names_) {
    for (const auto& name : delayed_service_names_) {
        Service* service = FindService(name);
        Service* service = FindService(name);
Loading