aboutgitcodebugslistschat
path: root/pasta.c
diff options
context:
space:
mode:
Diffstat (limited to 'pasta.c')
-rw-r--r--pasta.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pasta.c b/pasta.c
index 13ab18b..8c85546 100644
--- a/pasta.c
+++ b/pasta.c
@@ -135,15 +135,17 @@ void pasta_open_ns(struct ctx *c, const char *netns)
int nfd = -1;
nfd = open(netns, O_RDONLY | O_CLOEXEC);
- if (nfd < 0)
- die("Couldn't open network namespace %s", netns);
+ if (nfd < 0) {
+ die("Couldn't open network namespace %s: %s",
+ netns, strerror(errno));
+ }
c->pasta_netns_fd = nfd;
NS_CALL(ns_check, c);
if (c->pasta_netns_fd < 0)
- die("Couldn't switch to pasta namespaces");
+ die("Couldn't switch to pasta namespaces: %s", strerror(errno));
if (!c->no_netns_quit) {
char buf[PATH_MAX] = { 0 };
@@ -261,7 +263,7 @@ void pasta_start_ns(struct ctx *c, uid_t uid, gid_t gid,
NS_CALL(pasta_wait_for_ns, c);
if (c->pasta_netns_fd < 0)
- die("Failed to join network namespace");
+ die("Failed to join network namespace: %s", strerror(errno));
}
/**