+ assert(fs);
+
+ /* This is a very minimal lookup from controller names to
+ * paths. Since we have mounted most hierarchies ourselves
+ * should be kinda safe, but eventually we might want to
+ * extend this to have a fallback to actually check
+ * /proc/mounts. Might need caching then. */
+
+ if (streq(controller, SYSTEMD_CGROUP_CONTROLLER))
+ p = "systemd";
+ else if (startswith(controller, "name="))
+ p = controller + 5;
+ else
+ p = controller;
+
+ if (asprintf(&mp, "/cgroup/%s", p) < 0)
+ return -ENOMEM;