- adding missing install entry for luminary-libftdi.cfg
[openocd.git] / src / openocd.c
index 793dbbc6813f4a8f40af04ec75f15292a30ee125..b2a8ade561065d5c97b1e5c79dcb83dd5b1b5fc5 100644 (file)
@@ -379,6 +379,12 @@ int jim_command(command_context_t *context, char *line)
                        line = Jim_GetString(objPtr, NULL);
                        LOG_USER_N("In procedure '%s' called at file \"%s\", line %s" JIM_NL, proc, file, line);
            }
+           long t;
+           if (Jim_GetLong(interp, Jim_GetVariableStr(interp, "openocd_result", JIM_ERRMSG), &t)==JIM_OK)
+           {
+               return t;
+           }
+           return ERROR_FAIL;
        } else if (retcode == JIM_EXIT) {
                /* ignore. */
        /* exit(Jim_GetExitCode(interp)); */
@@ -392,7 +398,7 @@ int jim_command(command_context_t *context, char *line)
                                chunk = reslen - i;
                                if (chunk > 256)
                                        chunk = 256;
-                               strncpy(buff, result, chunk);
+                       strncpy(buff, result+i, chunk);
                                buff[chunk] = 0; 
                                LOG_USER_N("%s", buff);
                        }
@@ -419,6 +425,13 @@ static int Jim_Command_openocd_ignore(Jim_Interp *interp, int argc, Jim_Obj *con
        
        log_add_callback(tcl_output, tclOutput);
        retval=command_run_line_internal(active_cmd_ctx, cmd);
+
+       /* we need to be able to get at the retval, so we store in a variable
+        */
+       Jim_Obj *resultvar=Jim_NewIntObj(interp, retval);
+       Jim_IncrRefCount(resultvar);
+       Jim_SetGlobalVariableStr(interp, "openocd_result", resultvar);
+       Jim_DecrRefCount(interp, resultvar);
        
        if (startLoop)
        {
@@ -607,18 +620,6 @@ command_context_t *setup_command_handler(void)
        LOG_OUTPUT( OPENOCD_VERSION "\n" );
        
        
-       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
-       LOG_OUTPUT( "$URL$\n");
-       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
-       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
-
        register_command(cmd_ctx, NULL, "init", handle_init_command,
                                         COMMAND_ANY, "initializes target and servers - nop on subsequent invocations");
 
@@ -644,6 +645,18 @@ int openocd_main(int argc, char *argv[])
        command_context_t *cmd_ctx;
        cmd_ctx=setup_command_handler();
        
+       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line below does not appear in a patch, do not remove */
+       LOG_OUTPUT( "$URL$\n");
+       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
+       /* DANGER!!! make sure that the line above does not appear in a patch, do not remove */
+
        command_context_t *cfg_cmd_ctx;
        cfg_cmd_ctx = copy_command_context(cmd_ctx);
        cfg_cmd_ctx->mode = COMMAND_CONFIG;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)