Commit ecc357ca by Serge Hallyn

cgmanager: &existed for remove+create now returns -1 on failure

parent c3f0f139
...@@ -137,7 +137,7 @@ void cgmanager_remove_cgroup(const char *controller, const char *path) ...@@ -137,7 +137,7 @@ void cgmanager_remove_cgroup(const char *controller, const char *path)
if ( cgmanager_remove_sync(NULL, cgroup_manager, controller, if ( cgmanager_remove_sync(NULL, cgroup_manager, controller,
path, CG_REMOVE_RECURSIVE, &existed) != 0) path, CG_REMOVE_RECURSIVE, &existed) != 0)
ERROR("Error removing %s:%s", controller, path); ERROR("Error removing %s:%s", controller, path);
if (!existed) if (existed == -1)
INFO("cgroup removal attempt: %s:%s did not exist", controller, path); INFO("cgroup removal attempt: %s:%s did not exist", controller, path);
} }
...@@ -210,7 +210,7 @@ again: ...@@ -210,7 +210,7 @@ again:
cleanup_cgroups(d, tmp); cleanup_cgroups(d, tmp);
return false; return false;
} }
if (existed) if (existed == 1)
goto next; goto next;
} }
// success // success
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment