From c0045207a7cd3bc11aace920d895c69b027c16af Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 7 Feb 2015 16:17:44 -0600 Subject: Make toy_exec() check if argc is in optargs and deal with it there so we don't need a separate xexec_optargs(). --- toys/other/chroot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other/chroot.c') diff --git a/toys/other/chroot.c b/toys/other/chroot.c index 00fb4e7f..e82dd803 100644 --- a/toys/other/chroot.c +++ b/toys/other/chroot.c @@ -20,6 +20,6 @@ void chroot_main(void) char *binsh[] = {"/bin/sh", "-i", 0}; if (chdir(*toys.optargs) || chroot(".")) perror_exit("%s", *toys.optargs); - if (toys.optargs[1]) xexec_optargs(1); + if (toys.optargs[1]) xexec(toys.optargs+1); else xexec(binsh); } -- cgit v1.2.3