From: Erik M. <er...@us...> - 2001-10-07 22:36:14
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv32181/src/lib Modified Files: Makefile.am terminal.c Added Files: reboot.c Log Message: - Move the reboot command to the library - Put command help into terminal.c and reboot.c --- NEW FILE: reboot.c --- /* * reboot.c: Reboot board * * Copyright (C) 2001 Erik Mouw (J.A...@it...) * * $Id: reboot.c,v 1.1 2001/10/07 22:36:11 erikm Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ident "$Id: reboot.c,v 1.1 2001/10/07 22:36:11 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/serial.h> #include <blob/sa1100.h> #include <blob/time.h> char reboothelp[] = "reboot\n" "Reboot system\n"; int reboot(int argc, char *argv[]) { SerialOutputString("Rebooting...\n\n"); msleep(500); RCSR = 0; RSRR = 1; /* never reached, but anyway... */ return 0; } Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/lib/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 2001/10/07 20:29:38 1.3 +++ Makefile.am 2001/10/07 22:36:11 1.4 @@ -31,6 +31,7 @@ icache.c \ init.c \ led.c \ + reboot.c \ serial.c \ terminal.c \ time.c \ Index: terminal.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/terminal.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- terminal.c 2001/10/07 20:54:23 1.3 +++ terminal.c 2001/10/07 22:36:11 1.4 @@ -33,6 +33,12 @@ +char resethelp[] = "reset\n" +"Reset terminal\n"; + + + + int reset_terminal(int argc, char *argv[]) { int i; |