mirror of https://gerrit.osmocom.org/libosmocore
vty: Add functions to access index and node
It is easier to call these two functions from bindings than wrapping the vty structure and figuring out the alignment of the enum on all different ABIs.
This commit is contained in:
parent
2e228fc2af
commit
08aaded3b8
|
@ -155,6 +155,8 @@ int vty_config_unlock (struct vty *);
|
|||
int vty_shell (struct vty *);
|
||||
int vty_shell_serv (struct vty *);
|
||||
void vty_hello (struct vty *);
|
||||
void *vty_current_index(struct vty *);
|
||||
int vty_current_node(struct vty *vty);
|
||||
|
||||
extern void *tall_vty_ctx;
|
||||
#endif
|
||||
|
|
|
@ -248,6 +248,15 @@ int vty_out_newline(struct vty *vty)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void *vty_current_index(struct vty *vty)
|
||||
{
|
||||
return vty->index;
|
||||
}
|
||||
int vty_current_node(struct vty *vty)
|
||||
{
|
||||
return vty->node;
|
||||
}
|
||||
|
||||
int vty_config_lock(struct vty *vty)
|
||||
{
|
||||
if (vty_config == 0) {
|
||||
|
|
Loading…
Reference in New Issue