diff options
Diffstat (limited to 'lib/vty.h')
| -rw-r--r-- | lib/vty.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -166,6 +166,11 @@ static inline void vty_push_context(struct vty *vty, int node, uint64_t id) #define VTY_DECLVAR_CONTEXT_SUB(structname, ptr) \ struct structname *ptr = VTY_GET_CONTEXT_SUB(structname); \ VTY_CHECK_CONTEXT(ptr); +#define VTY_DECLVAR_INSTANCE_CONTEXT(structname, ptr) \ + if (vty->qobj_index == 0) \ + return CMD_NOT_MY_INSTANCE; \ + struct structname *ptr = VTY_GET_CONTEXT(structname); \ + VTY_CHECK_CONTEXT(ptr); struct vty_arg { const char *name; |
