summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Wiles <keith.wiles@intel.com>2017-10-30 13:33:47 -0500
committerKeith Wiles <keith.wiles@intel.com>2017-11-25 07:48:59 -0600
commit291fa0f33095f332e6de496b9f87d9f599df4e40 (patch)
treec586a25630e731e595282d24cab7a0740c862e2f
parentd23650740402c7f511e502acab3ab018163c4976 (diff)
downloaddpdk-draft-cli-291fa0f33095f332e6de496b9f87d9f599df4e40.zip
dpdk-draft-cli-291fa0f33095f332e6de496b9f87d9f599df4e40.tar.gz
dpdk-draft-cli-291fa0f33095f332e6de496b9f87d9f599df4e40.tar.xz
fix default setup tree
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
-rw-r--r--lib/librte_cli/cli.c4
-rw-r--r--lib/librte_cli/cli_cmds.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/librte_cli/cli.c b/lib/librte_cli/cli.c
index 7edb5f7..83f43f5 100644
--- a/lib/librte_cli/cli.c
+++ b/lib/librte_cli/cli.c
@@ -874,7 +874,9 @@ error_exit:
int
cli_create_with_defaults(void)
{
- return cli_create(CLI_DEFAULT_NODES, CLI_DEFAULT_HIST_LINES);
+ if (cli_create(CLI_DEFAULT_NODES, CLI_DEFAULT_HIST_LINES) == 0)
+ return cli_setup_with_defaults();
+ return -1;
}
/* Cleanup the CLI allocation of memory */
diff --git a/lib/librte_cli/cli_cmds.c b/lib/librte_cli/cli_cmds.c
index 54a1bac..c7c2bf0 100644
--- a/lib/librte_cli/cli_cmds.c
+++ b/lib/librte_cli/cli_cmds.c
@@ -41,6 +41,9 @@
#include <rte_debug.h>
#include <rte_log.h>
#include <rte_string_fns.h>
+#if RTE_VERSION >= RTE_VERSION_NUM(17, 5, 0, 0)
+#include <rte_bus_pci.h>
+#endif
#include "cli.h"
#include "cli_cmds.h"