gustavonihei commented on a change in pull request #4716:
URL: https://github.com/apache/incubator-nuttx/pull/4716#discussion_r736366580
##########
File path: arch/sim/Kconfig
##########
@@ -127,15 +127,26 @@ config SIM_WALLTIME_SIGNAL
endchoice
+choice
+ prompt "Simulated Network Interface"
+ default SIM_NETDEV if NET_ETHERNET
+
Review comment:
Something I wanted to prevent by suggesting the use of `optional` is
having this empty choice where the user has basically no action:

How about applying the following changes?
1) Add `depends on NET` to the root `choice`.
2) Add `optional` to the `choice`, so that even if there is Networking
support, the user may still not select it (no network interface simulation).
3) Transform `NET_ETHERNET` and `NET_USRSOCK` reverse dependencies of
`SIM_NETDEV` and `SIM_NETUSRSOCK`, respectively. This will prevent the `choice`
with zero options.
In the end, it would be like this:
```kconfig
choice SIM_NETINF
prompt "Simulated Network Interface"
default SIM_NETDEV
depends on NET
optional
config SIM_NETDEV
bool "Simulated Network Device"
select ARCH_HAVE_NETDEV_STATISTICS
select SCHED_LPWORK
select NET_ETHERNET
---help---
Built-in support for a simulated network device.
config SIM_NETUSRSOCK
bool "Simulated Network Device with Native Stack via usrsock"
select NET_USRSOCK
---help---
Built-in support for a simulated network device using native
stack via usrsock
endchoice
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]