Unverified Commit 5493a1bf by Stéphane Graber Committed by GitHub

Merge pull request #2543 from brauner/2018-08-17/silence_init_umount_failures

lxc_init: s/SYSDEBUG()/SYSERROR()/g in remove_self
parents 3278fdc2 694756df
...@@ -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