[api] force linker failures when using disabled features (#4127)

This commit is contained in:
Yakun Xu
2019-09-10 23:42:02 +08:00
committed by Jonathan Hui
parent 0b220613ab
commit 957d79d786
40 changed files with 265 additions and 660 deletions
+2
View File
@@ -524,12 +524,14 @@ void Interpreter::ProcessChannel(int argc, char *argv[])
SuccessOrExit(error = ParseLong(argv[2], value));
otChannelManagerRequestChannelChange(mInstance, static_cast<uint8_t>(value));
}
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
else if (strcmp(argv[1], "select") == 0)
{
VerifyOrExit(argc > 2, error = OT_ERROR_INVALID_ARGS);
SuccessOrExit(error = ParseLong(argv[2], value));
error = otChannelManagerRequestChannelSelect(mInstance, (value != 0) ? true : false);
}
#endif
else if (strcmp(argv[1], "auto") == 0)
{
VerifyOrExit(argc > 2, error = OT_ERROR_INVALID_ARGS);