From 30ebb153fb129bae14c4d2d95e42db9b1a45416d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 19 Nov 2018 16:42:06 -0600 Subject: A few more GLOBALS() single character argument style conversions. --- toys/other/nsenter.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'toys/other/nsenter.c') diff --git a/toys/other/nsenter.c b/toys/other/nsenter.c index 5424df7e..007e0556 100644 --- a/toys/other/nsenter.c +++ b/toys/other/nsenter.c @@ -64,13 +64,15 @@ config NSENTER #define FOR_nsenter #include "toys.h" +#include #include -int unshare(int flags); -int setns(int fd, int nstype); + +#define unshare(flags) syscall(SYS_unshare, flags) +#define setns(fd, nstype) syscall(SYS_setns, fd, nstype) GLOBALS( - char *nsnames[6]; - long targetpid; + char *Uupnmi[6]; + long t; ) // Code that must run in unshare's flag context @@ -144,12 +146,12 @@ void unshare_main(void) char *nsnames = "user\0uts\0pid\0net\0mnt\0ipc"; for (i = 0; i