]> git.sur5r.net Git - openocd/blobdiff - src/helper/fileio.c
added yours sincerely for files where I feel that I've made non-trivial contributions.
[openocd] / src / helper / fileio.c
index eaf8e0db3a6e757c16389b9472778d10443496e5..6b4a9f3ca8904e5c7f85da27dcd4a2d04b945f91 100644 (file)
@@ -2,6 +2,9 @@
  *   Copyright (C) 2007 by Dominic Rath                                    *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
+ *   Copyright (C) 2007,2008 Ã˜yvind Harboe                                      *
+ *   oyvind.harboe@zylin.com                                               *
+ *                                                                         *
  *   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     *
@@ -62,7 +65,7 @@ int fileio_open_local(fileio_t *fileio)
                        strcpy(access, "a+");   
                        break;
                default:
-                       ERROR("BUG: access neither read, write nor readwrite");
+                       LOG_ERROR("BUG: access neither read, write nor readwrite");
                        return ERROR_INVALID_ARGUMENTS;
        }
        
@@ -76,7 +79,7 @@ int fileio_open_local(fileio_t *fileio)
        
        if (!(fileio->file = open_file_from_path (fileio->url, access)))
        {
-               ERROR("couldn't open %s", fileio->url);
+               LOG_ERROR("couldn't open %s", fileio->url);
                return ERROR_FILEIO_OPERATION_FAILED;
        }
        
@@ -127,11 +130,11 @@ int fileio_close_local(fileio_t *fileio)
        {
                if (retval == EBADF)
                {
-                       ERROR("BUG: fileio_local->file not a valid file descriptor");
+                       LOG_ERROR("BUG: fileio_local->file not a valid file descriptor");
                }
                else
                {
-                       ERROR("couldn't close %s: %s", fileio->url, strerror(errno));
+                       LOG_ERROR("couldn't close %s: %s", fileio->url, strerror(errno));
                }
 
                return ERROR_FILEIO_OPERATION_FAILED;
@@ -157,7 +160,7 @@ int fileio_seek(fileio_t *fileio, u32 position)
        int retval;
        if ((retval = fseek(fileio->file, position, SEEK_SET)) != 0)
        {
-               ERROR("couldn't seek file %s: %s", fileio->url, strerror(errno));
+               LOG_ERROR("couldn't seek file %s: %s", fileio->url, strerror(errno));
                return ERROR_FILEIO_OPERATION_FAILED;
        }