From dfd8b1171be7d9458a18e88e7f925a0da0523135 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 20 Jan 2013 18:04:55 +0000 Subject: 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 --- sys-utils/nsenter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys-utils/nsenter.c') diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c index bb0c56144..7c9276f12 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) -- cgit v1.2.3-55-g7522