This is an automated email from Gerrit.

Tomasz CEDRO ([email protected]) just uploaded a new patch set to Gerrit, which 
you can find at http://openocd.zylin.com/1037

-- gerrit

commit 818f0ce02d8ac916f6f857218e33fa3fa625b4c8
Author: Tomek CEDRO <[email protected]>
Date:   Thu Nov 15 23:41:15 2012 +0100

    Small reorganization of log/debug messages. No functional changes.
    
    Change-Id: I950d1698147e894bbd660d6a7596aa30755a7586
    Signed-off-by: Tomek CEDRO <[email protected]>

diff --git a/src/interface/signal.c b/src/interface/signal.c
index 1a2aec3..46bef73 100644
--- a/src/interface/signal.c
+++ b/src/interface/signal.c
@@ -38,20 +38,20 @@ extern struct jtag_interface *jtag_interface;
  * \return pointer to signal structure in memory if found, NULL otherwise.
  */
 oocd_interface_signal_t *oocd_interface_signal_find(char *name){
-       //LOG_DEBUG("Searching for interface signal \"%s\"", name);
+       LOG_DEBUG("Interface signal: searching for signal '%s'...", name);
        // Check if interface already exists
        if (!jtag_interface){
-               LOG_ERROR("Interface does not yet exist!");
+               LOG_ERROR("Interface signal - interface does not yet exist!");
                return NULL;
        }
        // Check if interface signal to already exists
        if (!jtag_interface->signal){
-               LOG_DEBUG("No interface signals defined (yet?).");
+               LOG_DEBUG("Interface signal - not defined (yet?).");
                return NULL;
        }
        // Check if signal name is correct
        if (!name || strncmp(name, " ", 1)==0){
-               LOG_ERROR("Interface signal name cannot be empty.");
+               LOG_ERROR("Interface signal - name cannot be empty!");
                return NULL;
        }
        // Check if signal name already exist
@@ -59,13 +59,13 @@ oocd_interface_signal_t *oocd_interface_signal_find(char 
*name){
        sig=jtag_interface->signal;
        while (sig) {
                if (!strncasecmp(sig->name, name, 32)){
-                       LOG_DEBUG("Interface signal %s found.", sig->name);
+                       LOG_DEBUG("Interface signal - '%s' found.", sig->name);
                        return sig;
                }
                sig=sig->next;
        }
        // If signal is not found return null pointer.
-       LOG_WARNING("Interface signal %s not found.", name);
+       LOG_DEBUG("Interface signal - '%s' not found.", name);
        return NULL;
 }
 /** Add new signal to the interface.
@@ -82,16 +82,16 @@ oocd_interface_signal_t *oocd_interface_signal_find(char 
*name){
  * \return ERROR_OK on success or ERROR_FAIL on failure.
  */
 int oocd_interface_signal_add(char *name, unsigned int mask){
-       LOG_DEBUG("Adding signal \"%s\"", name);
+       LOG_DEBUG("Interface signal - adding '%s'...", name);
        // Check if interface already exists
        if (!jtag_interface){
-               LOG_ERROR("Interface does not yet exist!");
+               LOG_ERROR("Interface signal - interface does not yet exist!");
                return ERROR_FAIL;
        }
 
        // Check if name is correct string
        if (!name || strncmp(name, " ", 1)==0){
-               LOG_ERROR("Signal name cannot be empty");
+               LOG_ERROR("Interface signal - name cannot be empty!");
                return ERROR_FAIL;
        }
 
@@ -101,32 +101,32 @@ int oocd_interface_signal_add(char *name, unsigned int 
mask){
        // Check signal length (min=1, max=32 characters)
        snlen=strnlen(name, 32);
        if (snlen<1 || snlen>32) {
-               LOG_ERROR("Signal name too short or too long!");
+               LOG_ERROR("Interface signal - name too short or too long!");
                return ERROR_FAIL;
        }
 
        // Check if signal name already exist and return error if so
        if (oocd_interface_signal_find(name)){
-               LOG_ERROR("Specified signal already exist!");
+               LOG_ERROR("Interface signal - '%s' already exist!", name);
                return ERROR_FAIL;
        }
 
        // Allocate memory for new signal structure
        newsignal=(oocd_interface_signal_t *)calloc(1, 
sizeof(oocd_interface_signal_t));
        if (!newsignal) {
-               LOG_ERROR("cannot allocate memory for new signal: %s", name);
+               LOG_ERROR("Interface signal - cannot allocate memory for new 
signal '%s'!", name);
                return ERROR_FAIL;
        }
        newsignal->name=(char *)calloc(1, snlen+1);
        if (!newsignal->name) {
-               LOG_ERROR("cannot allocate memory for signal %s name", name);
+               LOG_ERROR("Interface signal - cannot allocate memory '%s' 
name!", name);
                return ERROR_FAIL;
        }
 
        // Initialize structure data and return or break on error
        for(;;){
                if (!strncpy(newsignal->name, name, snlen)) {
-                       LOG_ERROR("cannot copy signal %s name!", name);
+                       LOG_ERROR("Interface signal - cannot copy '%s' name!", 
name);
                        break;
                }
 
@@ -140,7 +140,7 @@ int oocd_interface_signal_add(char *name, unsigned int 
mask){
                        while(lastsignal->next) {lastsignal=lastsignal->next;}
                        lastsignal->next=newsignal;
                }
-               LOG_DEBUG("Signal \"%s\" added.", name);
+               LOG_INFO("Interface signal - '%s' added.", name);
                return ERROR_OK;
        }
 
@@ -156,21 +156,21 @@ int oocd_interface_signal_add(char *name, unsigned int 
mask){
  * \return ERROR_OK on success, ERROR_FAIL on failure.
  */
 int oocd_interface_signal_del(char *name){
-       LOG_DEBUG("Deleting signal \"%s\"", name);
+       LOG_DEBUG("Interface signal: deleting signal '%s'...", name);
        // Check if interface already exists
        if (!jtag_interface){
-               LOG_ERROR("Interface does not yet exist!");
+               LOG_ERROR("Interface signal - interface does not yet exist!");
                return ERROR_FAIL;
        }
        // Check if interface any signal exist
        if (!jtag_interface->signal){
-               LOG_ERROR("Signal list is empty!");
+               LOG_ERROR("Interface signal - list is empty!");
                return ERROR_FAIL;
        }
 
        // Check if signal name is correct
        if (!name || strncmp(name, " ", 1)==0){
-               LOG_ERROR("Signal name cannot be empty.");
+               LOG_ERROR("Interface signal - name cannot be empty!");
                return ERROR_FAIL;
        }
 
@@ -181,7 +181,7 @@ int oocd_interface_signal_del(char *name){
 
        //return error if signal is not on the list
        if (!delsig){
-               LOG_ERROR("Signal not found!");
+               LOG_ERROR("Interface signal - '%s' not found!", name);
                return ERROR_FAIL;
        }
 
@@ -202,7 +202,7 @@ int oocd_interface_signal_del(char *name){
        //now free memory of detached element
        free(delsig->name);
        free(delsig);
-       LOG_DEBUG("Signal \"%s\" removed.", name);
+       LOG_INFO("Interface signal - '%s' deleted.", name);
        return ERROR_OK;
 }
 
@@ -219,7 +219,7 @@ int oocd_interface_signal_del(char *name){
  */
 COMMAND_HANDLER(handle_oocd_interface_signal_command)
 {
-        LOG_DEBUG("entering function...");
+        LOG_DEBUG("Interface signal - entering tcl handler function...");
 
         if (!jtag_interface){
                 command_print(CMD_CTX, "You must initialize interface first!");

-- 

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to