unless it is already implemented and i missed it.

Spen
>From 00b218375ab15651476b5b563304c85b48829994 Mon Sep 17 00:00:00 2001
From: Spencer Oliver <[email protected]>
Date: Tue, 16 Mar 2010 20:26:00 +0000
Subject: [PATCH] SCRIPT: add add_script_search_dir cmd

Add a add_script_search_dir cmd so that adding search
dir's can be added to cfg scripts.

Signed-off-by: Spencer Oliver <[email protected]>
---
 src/openocd.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/openocd.c b/src/openocd.c
index d376f5f..54c454d 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -159,6 +159,16 @@ COMMAND_HANDLER(handle_init_command)
        return ERROR_OK;
 }
 
+COMMAND_HANDLER(handle_add_script_search_dir_command)
+{
+       if (CMD_ARGC != 1)
+               return ERROR_COMMAND_SYNTAX_ERROR;
+
+       add_script_search_dir(CMD_ARGV[0]);
+
+       return ERROR_OK;
+}
+
 static const struct command_registration openocd_command_handlers[] = {
        {
                .name = "version",
@@ -182,6 +192,13 @@ static const struct command_registration 
openocd_command_handlers[] = {
                        "called automatically at the end of startup.",
 
        },
+       {
+               .name = "add_script_search_dir",
+               .handler = &handle_add_script_search_dir_command,
+               .mode = COMMAND_ANY,
+               .help = "dir to search for config files and scripts",
+
+       },
        COMMAND_REGISTRATION_DONE
 };
 
-- 
1.6.6.1

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to