mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 11:13:50 +00:00
Fix reverse check: error out only if mkdir(cgroup/lxc) fails NOT due to -EEXIST
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
24b292c917
commit
d7436fc1df
@ -542,7 +542,7 @@ static int lxc_one_cgroup_create(const char *name,
|
|||||||
/* if cgparent does not exist, create it */
|
/* if cgparent does not exist, create it */
|
||||||
if (access(cgparent, F_OK)) {
|
if (access(cgparent, F_OK)) {
|
||||||
ret = mkdir(cgparent, 0755);
|
ret = mkdir(cgparent, 0755);
|
||||||
if (ret == -1 && errno == EEXIST) {
|
if (ret == -1 && errno != EEXIST) {
|
||||||
SYSERROR("failed to create '%s' directory", cgparent);
|
SYSERROR("failed to create '%s' directory", cgparent);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user