Commit d3b00a8f by Serge Hallyn

cgfsng: enter/escape error msgs: differentiate and add errno

parent 4ca12a59
...@@ -672,7 +672,7 @@ static bool parse_hierarchies(struct cgfsng_handler_data *d) ...@@ -672,7 +672,7 @@ static bool parse_hierarchies(struct cgfsng_handler_data *d)
return false; return false;
if ((f = fopen("/proc/self/mountinfo", "r")) == NULL) { if ((f = fopen("/proc/self/mountinfo", "r")) == NULL) {
ERROR("Failed opening /proc/self/mountinfo"); SYSERROR("Failed opening /proc/self/mountinfo");
return false; return false;
} }
...@@ -1009,7 +1009,7 @@ static bool cgfsng_enter(void *hdata, pid_t pid) ...@@ -1009,7 +1009,7 @@ static bool cgfsng_enter(void *hdata, pid_t pid)
char *fullpath = must_make_path(d->hierarchies[i]->fullcgpath, char *fullpath = must_make_path(d->hierarchies[i]->fullcgpath,
"cgroup.procs", NULL); "cgroup.procs", NULL);
if (lxc_write_to_file(fullpath, pidstr, len, false) != 0) { if (lxc_write_to_file(fullpath, pidstr, len, false) != 0) {
ERROR("Failed to enter %s", fullpath); SYSERROR("Failed to enter %s", fullpath);
free(fullpath); free(fullpath);
return false; return false;
} }
...@@ -1178,7 +1178,7 @@ static bool cgfsng_escape(void *hdata) ...@@ -1178,7 +1178,7 @@ static bool cgfsng_escape(void *hdata)
d->hierarchies[i]->base_cgroup, d->hierarchies[i]->base_cgroup,
"cgroup.procs", NULL); "cgroup.procs", NULL);
if (lxc_write_to_file(fullpath, "0", 2, false) != 0) { if (lxc_write_to_file(fullpath, "0", 2, false) != 0) {
ERROR("Failed to enter %s", fullpath); SYSERROR("Failed to escape to %s", fullpath);
free(fullpath); free(fullpath);
return false; return false;
} }
......
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