Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34811?usp=email )
Change subject: mobile: vty: rework support enable/disable commands ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File src/host/layer23/src/mobile/vty_interface.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/34811/comment/210be6a8_b01f7aea PS1, Line 2019: struct osmocom_ms *ms = vty->index; \
Did you think about having all this code in a single helper function where you pass a bool* to it? T […]
I didn't think of it, but now that you raised this topic... Not only we need to pass a bool, but also **a field name**. What we can move to the common part is a) checking `if (!sup->item) { ... }` and b) `if (restart) ...`. The actual field assignment would remain here. Though I don't see much benefit of doing so because part a) returns in two places...
Oh wait, we could actually pass pointers! Here is my attempt:
https://gerrit.osmocom.org/c/osmocom-bb/+/34836 [WIP]
This patch works, but there are problems to be resolved (e.g. some fields are `uint8_t` and some are `bool`). I marked it WIP, feel free to take over if you wish. I will not be spending more time on it because there is still plenty of things to do apart from improving the VTY commands...