diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-11-09 13:25:44 +0200 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-11-09 13:25:44 +0200 |
commit | a842c1ff4e894ef4750cec4bb1f3830a1de047b3 (patch) | |
tree | 174f10055c47f52ac74880a82bb6a367333ffae0 /src/bp_sim.h | |
parent | ae863c50263aa79391d4b81238c19a4b920ecc47 (diff) |
Fix issue when --vlan option appearing before -i option
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/bp_sim.h')
-rwxr-xr-x | src/bp_sim.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h index cd0f6a13..4899644b 100755 --- a/src/bp_sim.h +++ b/src/bp_sim.h @@ -824,6 +824,11 @@ public: return ( (m_expected_portd>>1) * preview.getCores()); } bool is_stateless(){ + if (m_run_mode == RUN_MODE_INVALID) { + fprintf(stderr, "Internal bug: Calling is stateless before initializing run mode\n"); + fprintf(stderr, "Try to put -i or -f <file> option as first in the option list\n"); + exit(-1); + } return (m_run_mode == RUN_MODE_INTERACTIVE ?true:false); } bool is_latency_enabled() { |