]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_init: s/SYSDEBUG()/SYSERROR()/g in remove_self 2543/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 17 Aug 2018 09:47:25 +0000 (11:47 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 17 Aug 2018 09:47:25 +0000 (11:47 +0200)
Since we switched to execveat() whenever possible in
commit 4b5b3a2a299b ("execute: use execveat() syscall if supported")
it is unlikely that remove_self() has any job to do at all. So dumb down the
error levels.

Closes #2536.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cmd/lxc_init.c

index 7f47cbddb27f9050152127142e879145a1e77a47..17d93f80b07a1562faa694a6cb178bf4cf0341e7 100644 (file)
@@ -201,20 +201,20 @@ static void remove_self(void)
 
        n = readlink("/proc/self/exe", path, sizeof(path));
        if (n < 0 || n >= MAXPATHLEN) {
-               SYSERROR("Failed to readlink \"/proc/self/exe\"");
+               SYSDEBUG("Failed to readlink \"/proc/self/exe\"");
                return;
        }
        path[n] = '\0';
 
        ret = umount2(path, MNT_DETACH);
        if (ret < 0) {
-               SYSERROR("Failed to unmount \"%s\"", path);
+               SYSDEBUG("Failed to unmount \"%s\"", path);
                return;
        }
 
        ret = unlink(path);
        if (ret < 0) {
-               SYSERROR("Failed to unlink \"%s\"", path);
+               SYSDEBUG("Failed to unlink \"%s\"", path);
                return;
        }
 }