Commit 861606d3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Also reset global cmds like barrier

parent de3e581e
......@@ -65,6 +65,8 @@ vtc_vrnd_unlock(void)
AZ(pthread_mutex_unlock(&vtc_vrnd_mtx));
}
static const char *tfn;
/**********************************************************************
* Macro facility
*/
......@@ -79,6 +81,18 @@ struct macro {
static VTAILQ_HEAD(,macro) macro_list = VTAILQ_HEAD_INITIALIZER(macro_list);
static const struct cmds global_cmds[] = {
#define CMD_GLOBAL(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};
static const struct cmds cmds[] = {
#define CMD_TOP(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};
/**********************************************************************/
static struct macro *
......@@ -290,12 +304,6 @@ macro_expand(struct vtclog *vl, const char *text)
* Static checkers like Coverity may bitch about this, but we don't care.
*/
static const struct cmds global_cmds[] = {
#define CMD_GLOBAL(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};
void
parse_string(const char *spec, const struct cmds *cmd, void *priv,
......@@ -448,14 +456,6 @@ reset_cmds(const struct cmds *cmd)
* Execute a file
*/
static const struct cmds cmds[] = {
#define CMD_TOP(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};
static const char *tfn;
int
fail_out(void)
{
......@@ -470,6 +470,7 @@ fail_out(void)
if (!vtc_stop)
vtc_stop = 1;
vtc_log(vltop, 1, "RESETTING after %s", tfn);
reset_cmds(global_cmds);
reset_cmds(cmds);
vtc_error |= old_err;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment