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

Commit b6071f19 authored by T.J. Mercier's avatar T.J. Mercier
Browse files

libprocessgroup: Convert CGROUPV2_HIERARCHY_NAME to std::string

Almost everywhere CGROUPV2_HIERARCHY_NAME is used a std::string is
required, so change its type to avoid temporaries.

Change-Id: I4466838c510f2eb8212fc71999cdaa47359ce9c3
parent 9e5f74d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@

__BEGIN_DECLS

static constexpr const char* CGROUPV2_HIERARCHY_NAME = "cgroup2";
static constexpr std::string CGROUPV2_HIERARCHY_NAME = "cgroup2";

bool CgroupsAvailable();
bool CgroupGetControllerPath(const std::string& cgroup_name, std::string* path);
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
    const CgroupController* controller = descriptor.controller();

    if (controller->version() == 2) {
        if (!strcmp(controller->name(), CGROUPV2_HIERARCHY_NAME)) {
        if (controller->name() == CGROUPV2_HIERARCHY_NAME) {
            return MountV2CgroupController(descriptor);
        } else {
            return ActivateV2CgroupController(descriptor);