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...
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34811?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ibfef31f6dd7694dad535ad07fdf47bd32571b7b2
Gerrit-Change-Number: 34811
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Oct 2023 09:05:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment