Date: Wed, 3 Sep 2008 10:56:50 GMT From: Rui Paulo <rpaulo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 149108 for review Message-ID: <200809031056.m83AuoF7001965@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149108 Change 149108 by rpaulo@rpaulo_phi on 2008/09/03 10:56:25 Implement the reboot command. Affected files ... .. //depot/projects/efi/boot/i386/efi/main.c#2 edit Differences ... ==== //depot/projects/efi/boot/i386/efi/main.c#2 (text+ko) ==== @@ -115,6 +115,22 @@ return (EFI_SUCCESS); /* keep compiler happy */ } +COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot); + +static int +command_reboot(int argc, char *argv[]) +{ + int i; + + for (i = 0; devsw[i] != NULL; ++i) + if (devsw[i]->dv_cleanup != NULL) + (devsw[i]->dv_cleanup)(); + + RS->ResetSystem(EfiResetCold, EFI_SUCCESS, 23, + (CHAR16 *)"Reboot from the loader"); + exit(0); +} + COMMAND_SET(quit, "quit", "exit the loader", command_quit); static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809031056.m83AuoF7001965>