Hey all,

I wanted to make it so I can be ignorant of a commands invocation string, so
I tried to use CMD_CURRENT (aka cmd->current) which is supposed to house a
pointer to the current command.  It turns out that this isn't being set.
This patch makes it so the command invocation structure has the current
command set before passing the structure on.

-- 
// Dean Glazeski
From 0ae4eec403c52f8075172fcd10a0ce48ac9480b4 Mon Sep 17 00:00:00 2001
From: Dean Glazeski <[email protected]>
Date: Fri, 1 Jan 2010 19:58:38 -0600
Subject: [PATCH] Add the current command to the command information

Adds the current command structure to the command invocation structure before
sending it along to the command handler.
---
 src/helper/command.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/helper/command.c b/src/helper/command.c
index 41f502c..3a53d09 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -580,6 +580,7 @@ static int run_command(struct command_context *context,
 
 	struct command_invocation cmd = {
 			.ctx = context,
+			.current = c,
 			.name = c->name,
 			.argc = num_words - 1,
 			.argv = words + 1,
-- 
1.6.5.2

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

Reply via email to