lxc_init: s/SYSDEBUG()/SYSERROR()/g in remove_self

Since we switched to execveat() whenever possible in commit 4b5b3a2a ("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: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent a65febb0
...@@ -201,20 +201,20 @@ static void remove_self(void) ...@@ -201,20 +201,20 @@ static void remove_self(void)
n = readlink("/proc/self/exe", path, sizeof(path)); n = readlink("/proc/self/exe", path, sizeof(path));
if (n < 0 || n >= MAXPATHLEN) { if (n < 0 || n >= MAXPATHLEN) {
SYSERROR("Failed to readlink \"/proc/self/exe\""); SYSDEBUG("Failed to readlink \"/proc/self/exe\"");
return; return;
} }
path[n] = '\0'; path[n] = '\0';
ret = umount2(path, MNT_DETACH); ret = umount2(path, MNT_DETACH);
if (ret < 0) { if (ret < 0) {
SYSERROR("Failed to unmount \"%s\"", path); SYSDEBUG("Failed to unmount \"%s\"", path);
return; return;
} }
ret = unlink(path); ret = unlink(path);
if (ret < 0) { if (ret < 0) {
SYSERROR("Failed to unlink \"%s\"", path); SYSDEBUG("Failed to unlink \"%s\"", path);
return; return;
} }
} }
......
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