<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/24691">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: make function cmd_range_match() public<br><br>Certain control interface commands also may require to verfy a range in<br>their verify function. cmd_range_match() from the VTY does exactly that<br>and the range can be specified as string, the same way as we would<br>specify it in the VTY.<br><br>Change-Id: I53fc207677f52b1dc748b01d58424839cdba807c<br>related: SYS#5369<br>---<br>M include/osmocom/vty/command.h<br>M src/vty/command.c<br>2 files changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/24691/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h</span><br><span>index 81333b4..01209f5 100644</span><br><span>--- a/include/osmocom/vty/command.h</span><br><span>+++ b/include/osmocom/vty/command.h</span><br><span>@@ -483,4 +483,6 @@</span><br><span> int vty_dump_xml_ref_mode(FILE *stream, enum vty_ref_gen_mode mode);</span><br><span> int vty_dump_xml_ref(FILE *stream) OSMO_DEPRECATED("Use vty_dump_xml_ref_mode() instead");</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+int cmd_range_match(const char *range, const char *str);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! @} */</span><br><span>diff --git a/src/vty/command.c b/src/vty/command.c</span><br><span>index 6d63d84..48ac031 100644</span><br><span>--- a/src/vty/command.c</span><br><span>+++ b/src/vty/command.c</span><br><span>@@ -1477,7 +1477,7 @@</span><br><span> #error "LONG_MAX not defined!"</span><br><span> #endif</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static int cmd_range_match(const char *range, const char *str)</span><br><span style="color: hsl(120, 100%, 40%);">+int cmd_range_match(const char *range, const char *str)</span><br><span> {</span><br><span>        char *p;</span><br><span>     char buf[DECIMAL_STRLEN_MAX_UNSIGNED + 1];</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/24691">change 24691</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/24691"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I53fc207677f52b1dc748b01d58424839cdba807c </div>
<div style="display:none"> Gerrit-Change-Number: 24691 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>