diff options
author | Sami Kerola | 2013-01-20 19:04:55 +0100 |
---|---|---|
committer | Karel Zak | 2013-01-25 15:41:00 +0100 |
commit | dfd8b1171be7d9458a18e88e7f925a0da0523135 (patch) | |
tree | 3ef0b97d37b550c4b4ad7346afdddcb39794e930 /sys-utils/nsenter.c | |
parent | nsenter: fix compiler warning (diff) | |
download | kernel-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.c | 3 |
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) |