diff packages/redboot/current/include/redboot.h @ 2257:467fd46113f3

* src/fs/fileio.c (do_list): Use getcwd for current directory, rather than "." which may not be implemented in the FS. * src/parse.c (redboot_exec): Conditionalise use of __mem_fault_handler to only be when stubs are included. (error_handler): Ditto for this function. * src/main.c (cyg_start): Conditionalise use of __mem_fault_handler to only be when stubs are included. (do_go): Ditto. (error_handler): Ditto for this function. * src/fs/fileio.c (do_mkdir, do_deldir, do_del, do_write): Added some extra argument checking to these functions. * src/fs/fileio.c (do_mount): Only support -f with "legacy" flash block devices. Clear mount table on failure. (do_move): Silence rename undefined warning. (do_write): Silence warnings. (do_info): Support longer device names. * src/decompress.c (ZLIB_COMPRESSION_OVERHEAD): Increase substantially if jffs2 is present. * src/fs/fileio.c: Fixed some bugs in handling of mounts. The strings used in the mount table must be copied, otherwise the mount table is corrupted by later commands. Also toughened up some error testing. * doc/redboot_cmds.sgml: Added file mode documentation to load command. * doc/redboot_cmds.sgml: Added documentation of filesystem access commands. * src/fs/fileio.c (do_write): Added O_TRUNC to the open call to ensure that the file is resized to fit the new data. * src/fs/fileio.c: Significantly reorganized to present an interface similar to the fis commands. Added a variety of command to manipulate files and directories in a filesystem. * src/parse.c: Added redboot_exec() to provide an internal interface for executing RedBoot commands. Added err_printf() which allows an error message to be printed before longjumping out to an enclosing call to redboot_exec(). Where redboot_exec() is not involved, it just behaves like diag_printf(). * src/main.c: Removed unnecessary delay during startup. Changed diag_printf() in do_go() into err_printf(). * src/load.c: Changed some calls to diag_printf() to err_printf(). * src/net/net_io.c: Changed init priority to RedBoot_INIT_NET. * include/redboot.h: Added some extra initialization priorities. Added prototypes for redboot_exec() and err_printf().
author jlarmour
date Thu, 20 Jul 2006 20:27:47 +0000
parents 5c5e93c863ac
children b8111f0a6f98
line wrap: on
line diff
--- a/packages/redboot/current/include/redboot.h
+++ b/packages/redboot/current/include/redboot.h
@@ -10,6 +10,7 @@
 // This file is part of eCos, the Embedded Configurable Operating System.
 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
 // Copyright (C) 2002, 2003, 2004, 2005 Gary Thomas
+// Copyright (C) 2004, 2005 eCosCentric Limited
 //
 // eCos 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
@@ -251,11 +252,14 @@ extern _cmd_entry(_s_,_h_,_u_,_f_,_subs_
 static _cmd_entry(_s_,_h_,_u_,_f_,0,0,_n_)
 
 // Initialization functions
-#define RedBoot_INIT_FIRST  0000
-#define RedBoot_INIT_SECOND 0100
+#define RedBoot_INIT_FIRST              0000
+#define RedBoot_INIT_SECOND             0100
 // Specify a 3 digit numeric value for proper prioritizing
 #define RedBoot_INIT_PRIO(_n_) 1##_n_
-#define RedBoot_INIT_LAST  9999
+#define RedBoot_INIT_BEFORE_NET         6900
+#define RedBoot_INIT_NET                7000
+#define RedBoot_INIT_AFTER_NET          7100
+#define RedBoot_INIT_LAST               9999
 typedef void void_fun(void);
 typedef void_fun *void_fun_ptr;
 struct init_tab_entry {
@@ -312,6 +316,10 @@ externC bool scan_opts(int argc, char *a
                        struct option_info *opts, int num_opts, 
                        void *def_arg, int def_arg_type, char *def_descr);
 
+externC int redboot_exec( char *command, ... );
+
+externC void err_printf( char *fmt, ... );
+
 #ifdef CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS
 #define CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS \
   (CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS+CYGNUM_HAL_VIRTUAL_VECTOR_AUX_CHANNELS)