diff -ru system_cmds-431/reboot.tproj/reboot.c system_cmds-431+iPhone/reboot.tproj/reboot.c --- system_cmds-431/reboot.tproj/reboot.c 2007-09-06 20:46:17.000000000 +0000 +++ system_cmds-431+iPhone/reboot.tproj/reboot.c 2008-03-30 20:43:53.000000000 +0000 @@ -63,7 +63,6 @@ #include // allocate #include // task_self, etc #include // bootstrap -#include #endif void usage(void); @@ -81,11 +80,9 @@ int ch, howto, kflag, lflag, nflag, qflag, uflag; char *p; const char *user; -#ifndef __APPLE__ int i, fd, pflag, sverrno; u_int pageins; char *kernel; -#endif if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) { dohalt = 1; @@ -240,19 +237,16 @@ } #endif -#ifdef __APPLE__ - // launchd(8) handles reboot. This call returns NULL on success. - exit(reboot2(howto) == NULL ? EXIT_SUCCESS : EXIT_FAILURE); -#else /* __APPLE__ */ reboot(howto); /* FALLTHROUGH */ +#ifndef __APPLE__ restart: +#endif sverrno = errno; errx(1, "%s%s", kill(1, SIGHUP) == -1 ? "(can't restart init): " : "", strerror(sverrno)); /* NOTREACHED */ -#endif /* __APPLE__ */ } void