2
0
mirror of git://github.com/lxc/lxc synced 2025-09-03 21:49:34 +00:00

lxc_cgroup_set not reporting error

this is a side effect of previous patch I made
on this same function in commit
a6ddef6149

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Michel Normand
2010-01-08 14:34:13 +01:00
committed by Daniel Lezcano
parent 0bb4f8cf3b
commit 4eec6850fc

View File

@@ -165,7 +165,7 @@ int lxc_cgroup_path_get(char **path, const char *name)
int lxc_cgroup_set(const char *name, const char *subsystem, const char *value) int lxc_cgroup_set(const char *name, const char *subsystem, const char *value)
{ {
int fd, ret = -1; int fd, ret;
char *nsgroup; char *nsgroup;
char path[MAXPATHLEN]; char path[MAXPATHLEN];
@@ -181,7 +181,8 @@ int lxc_cgroup_set(const char *name, const char *subsystem, const char *value)
return -1; return -1;
} }
if (write(fd, value, strlen(value)) < 0) { ret = write(fd, value, strlen(value));
if (ret < 0) {
ERROR("write %s : %s", path, strerror(errno)); ERROR("write %s : %s", path, strerror(errno));
goto out; goto out;
} }