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

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2014-01-19 09:17:23 -06:00
parent c3f0f139e1
commit ecc357ca08

View File

@ -137,7 +137,7 @@ void cgmanager_remove_cgroup(const char *controller, const char *path)
if ( cgmanager_remove_sync(NULL, cgroup_manager, controller,
path, CG_REMOVE_RECURSIVE, &existed) != 0)
ERROR("Error removing %s:%s", controller, path);
if (!existed)
if (existed == -1)
INFO("cgroup removal attempt: %s:%s did not exist", controller, path);
}
@ -210,7 +210,7 @@ again:
cleanup_cgroups(d, tmp);
return false;
}
if (existed)
if (existed == 1)
goto next;
}
// success