From ae37905b93d1fcb4e798fad7ac3b869198fd917f Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Sat, 24 Oct 2020 22:36:20 +0000 Subject: [PATCH] sockstat: Fix error message when jail_attach fails jail_errmsg is for libjail, jail_attach() is a system call. --- usr.bin/sockstat/sockstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 174e7dacd0e..5ddbf077550 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -1372,7 +1372,7 @@ main(int argc, char *argv[]) errx(2, "%s", jail_errmsg); case JAIL_SYS_NEW: if (jail_attach(opt_j) < 0) - errx(3, "%s", jail_errmsg); + err(3, "jail_attach()"); /* Set back to -1 for normal output in vnet jail. */ opt_j = -1; break;