Skip to content

Commit

Permalink
[CUMULUS] Revert "vtysh: Add error code if daemon is not running"
Browse files Browse the repository at this point in the history
This reverts commit a32f6a1.

This commit made FRR Return a 1 instead of a 0 when a daemon
is not running.  Back this out and let the chips fall where
they may.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Dec 12, 2024
1 parent f4fbf38 commit 451da6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ struct cmd_node {
#define CMD_WARNING_CONFIG_FAILED 13
#define CMD_NOT_MY_INSTANCE 14
#define CMD_NO_LEVEL_UP 15
#define CMD_ERR_NO_DAEMON 16

/* Argc max counts. */
#define CMD_ARGC_MAX 256
Expand Down
5 changes: 2 additions & 3 deletions vtysh/vtysh.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,7 @@ static int vtysh_execute_func(const char *line, int pager)
fprintf(stderr,
"%s is not running\n",
vtysh_client[i].name);
cmd_stat = CMD_ERR_NO_DAEMON;
break;
continue;
}
}
cmd_stat = vtysh_client_execute(
Expand All @@ -652,7 +651,7 @@ static int vtysh_execute_func(const char *line, int pager)
break;
}
}
if (cmd_stat != CMD_SUCCESS && cmd_stat != CMD_ERR_NO_DAEMON)
if (cmd_stat != CMD_SUCCESS)
break;

if (cmd->func)
Expand Down

0 comments on commit 451da6b

Please sign in to comment.