]> git.proxmox.com Git - mirror_lxc.git/commitdiff
cgfsng: enter/escape error msgs: differentiate and add errno
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 8 Mar 2016 17:02:52 +0000 (09:02 -0800)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 8 Mar 2016 17:02:52 +0000 (09:02 -0800)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/cgfsng.c

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