From: Sami Kerola Date: Sun, 20 Jan 2013 18:04:55 +0000 (+0000) Subject: nsenter: drop core when impossible happens X-Git-Tag: v2.23-rc1~295 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfd8b1171be7d9458a18e88e7f925a0da0523135;p=thirdparty%2Futil-linux.git nsenter: drop core when impossible happens Message to user is less informative, but impossible events should be rare so core files are much appriciated for these cases. Signed-off-by: Sami Kerola --- diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c index bb0c561441..7c9276f12c 100644 --- a/sys-utils/nsenter.c +++ b/sys-utils/nsenter.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "strutils.h" #include "nls.h" @@ -118,7 +119,7 @@ static void open_namespace_fd(int nstype, const char *path) return; } /* This should never happen */ - err(EXIT_FAILURE, "Unrecognized namespace type"); + assert(nsfile->nstype); } static void continue_as_child(void)