diff options
author | Li Cao <irvingcl@google.com> | 2021-12-01 10:02:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 18:02:39 -0800 |
commit | 4cda3157c1c9fc803ecd46bf6807e140d418d333 (patch) | |
tree | 156ff76dacee3539ecc859c5bd87d7eea44a9fab /src/agent | |
parent | 2257ce97b84be02c063f0b05115279db6f9305d3 (diff) | |
download | ot-br-posix-4cda3157c1c9fc803ecd46bf6807e140d418d333.tar.gz |
[agent] set dry-run option in Thread config if printRadioVersion is true (#1028)
`otbr-agent` will exit directly if `--radio-version` is passed in
parameters. This PR sets the DryRun option in PosixConfig when
`radio-version` is set. In this way, the posix instance will only
initialize very few things to avoid permission issues.
Diffstat (limited to 'src/agent')
-rw-r--r-- | src/agent/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/agent/main.cpp b/src/agent/main.cpp index 61a59319..5ec22df9 100644 --- a/src/agent/main.cpp +++ b/src/agent/main.cpp @@ -285,7 +285,8 @@ static int realmain(int argc, char *argv[]) } { - otbr::Ncp::ControllerOpenThread ncpOpenThread{interfaceName, radioUrls, backboneInterfaceName}; + otbr::Ncp::ControllerOpenThread ncpOpenThread{interfaceName, radioUrls, backboneInterfaceName, + /* aDryRun */ printRadioVersion}; otbr::InstanceParams::Get().SetThreadIfName(interfaceName); otbr::InstanceParams::Get().SetBackboneIfName(backboneInterfaceName); |