Skip to content

Commit

Permalink
cleanup: rename none into nodriver
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
Co-authored-by: Luca Guerra <[email protected]>
  • Loading branch information
Andreagit97 and LucaGuerra committed Jan 16, 2024
1 parent b718083 commit 69e7f26
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion falco.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ rules_file:
# - `modern_ebpf`: Modern eBPF (CO-RE eBPF probe)
# - `gvisor`: gVisor (gVisor sandbox)
# - `replay`: Replay a scap trace file
# - `none`: No event producer loaded, useful to run with plugins.
# - `nodriver`: No driver is injected into the system.
# This is useful to debug and to run plugins with 'syscall' source.
#
# Only one engine can be specified in the `kind` key.
# Moreover, for each engine multiple options might be available,
Expand Down
4 changes: 2 additions & 2 deletions userspace/falco/app/actions/load_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ static falco::app::run_result apply_deprecated_options(falco::app::state& s)
}
if (s.options.nodriver)
{
falco_logger::log(falco_logger::level::WARNING, "DEPRECATION NOTICE: the '--nodriver' command line option is deprecated and will be removed in Falco 0.38! Set 'engine.kind: none' instead in falco.yaml\n");
s.config->m_engine_mode = engine_kind_t::NONE;
falco_logger::log(falco_logger::level::WARNING, "DEPRECATION NOTICE: the '--nodriver' command line option is deprecated and will be removed in Falco 0.38! Set 'engine.kind: nodriver' instead in falco.yaml\n");
s.config->m_engine_mode = engine_kind_t::NODRIVER;
}
if (!s.options.capture_file.empty())
{
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ struct state

inline bool is_nodriver() const
{
return config->m_engine_mode == engine_kind_t::NONE;
return config->m_engine_mode == engine_kind_t::NODRIVER;
}

inline bool is_source_enabled(const std::string& src) const
Expand Down
4 changes: 2 additions & 2 deletions userspace/falco/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void falco_configuration::load_engine_config(const std::string& config_name, con
{"modern_ebpf",engine_kind_t::MODERN_EBPF},
{"replay",engine_kind_t::REPLAY},
{"gvisor",engine_kind_t::GVISOR},
{"none",engine_kind_t::NONE},
{"nodriver",engine_kind_t::NODRIVER},
};

auto driver_mode_str = config.get_scalar<std::string>("engine.kind", "kmod");
Expand Down Expand Up @@ -172,7 +172,7 @@ void falco_configuration::load_engine_config(const std::string& config_name, con
}
m_gvisor.m_root = config.get_scalar<std::string>("engine.gvisor.root", "");
break;
case engine_kind_t::NONE:
case engine_kind_t::NODRIVER:
default:
break;
}
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ enum class engine_kind_t : uint8_t
MODERN_EBPF,
REPLAY,
GVISOR,
NONE
NODRIVER
};

class falco_configuration
Expand Down

0 comments on commit 69e7f26

Please sign in to comment.