summaryrefslogtreecommitdiffstats
path: root/sys-utils/nsenter.c
diff options
context:
space:
mode:
authorSami Kerola2013-01-20 19:04:55 +0100
committerKarel Zak2013-01-25 15:41:00 +0100
commitdfd8b1171be7d9458a18e88e7f925a0da0523135 (patch)
tree3ef0b97d37b550c4b4ad7346afdddcb39794e930 /sys-utils/nsenter.c
parentnsenter: fix compiler warning (diff)
downloadkernel-qcow2-util-linux-dfd8b1171be7d9458a18e88e7f925a0da0523135.tar.gz
kernel-qcow2-util-linux-dfd8b1171be7d9458a18e88e7f925a0da0523135.tar.xz
kernel-qcow2-util-linux-dfd8b1171be7d9458a18e88e7f925a0da0523135.zip
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 <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/nsenter.c')
-rw-r--r--sys-utils/nsenter.c3
1 files changed, 2 insertions, 1 deletions
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 <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
+#include <assert.h>
#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)