Skip to content

Commit

Permalink
Merge pull request #2543 from brauner/2018-08-17/silence_init_umount_…
Browse files Browse the repository at this point in the history
…failures

lxc_init: s/SYSDEBUG()/SYSERROR()/g in remove_self
  • Loading branch information
stgraber committed Aug 17, 2018
2 parents 3278fdc + 694756d commit 5493a1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lxc/cmd/lxc_init.c
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 5493a1b

Please sign in to comment.