changeset 2817:6e1e5c6da98e

* src/flash.c (do_flash_init): Update for minor flash API mod to call cyg_flash_set_global_printf() to set printf function.
author jlarmour
date Thu, 19 Feb 2009 00:16:37 +0000
parents 422d0a343b4d
children 7894f6bee6e5
files packages/redboot/current/ChangeLog packages/redboot/current/src/flash.c
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog
+++ b/packages/redboot/current/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-19  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* src/flash.c (do_flash_init): Update for minor flash API
+        mod to call cyg_flash_set_global_printf() to set printf
+        function.
+
 2009-02-06  John Dallaway  <john@dallaway.org.uk>
 
 	* cdl/redboot.cdl: Fix documentation reference.
--- a/packages/redboot/current/src/flash.c
+++ b/packages/redboot/current/src/flash.c
@@ -8,7 +8,7 @@
 // ####ECOSGPLCOPYRIGHTBEGIN####                                            
 // -------------------------------------------                              
 // This file is part of eCos, the Embedded Configurable Operating System.   
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 //
 // 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     
@@ -1861,8 +1861,9 @@ do_flash_init(void)
 
     if (!__flash_init) {
         __flash_init = 1;
-        
-        if ((stat = cyg_flash_init(diag_printf)) != 0) {
+
+        cyg_flash_set_global_printf((cyg_flash_printf *)&diag_printf);
+        if ((stat = cyg_flash_init()) != 0) {
             diag_printf("FLASH: driver init failed: %s\n", cyg_flash_errmsg(stat));
             return -1;
         }