summaryrefslogtreecommitdiff
path: root/lib/vty.h
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-06-18 16:19:54 -0400
committerChristian Hopps <chopps@labn.net>2023-06-25 04:46:54 -0400
commitc10f8e6da6ec7bc032c9d8da5efcf598b60c9b2c (patch)
treed38eb6bd449bfe81f34ad8e80eb908adfb7e3d24 /lib/vty.h
parent318de85f628c41570dfef79558868fe786c4c356 (diff)
mgmtd: KISS the locking code
Move away from things like "lock if not locked" type code, require the user has locked prior to geting to that point. For now we warn if we are taking a lock we already had; however, this should really be a failure point. New requirements: SETCFG - not implicit commit - requires user has locked candidate DS and they must unlock after implicit commit - requires user has locked candidate and running DS both locks will be unlocked on reply to the SETCFG COMMITCFG - requires user has locked candidate and running DS and they must unlock after rollback - this code now get both locks and then does an unlock and early return thing on the adapter side. It needs to be un-special cased in follow up work that would also include tests for this functionality. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/vty.h')
-rw-r--r--lib/vty.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vty.h b/lib/vty.h
index 7e27b52fe1..8fb1483e5b 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -391,7 +391,7 @@ extern void vty_close(struct vty *);
extern char *vty_get_cwd(void);
extern void vty_update_xpath(const char *oldpath, const char *newpath);
extern int vty_config_enter(struct vty *vty, bool private_config,
- bool exclusive);
+ bool exclusive, bool file_lock);
extern void vty_config_exit(struct vty *);
extern int vty_config_node_exit(struct vty *);
extern int vty_shell(struct vty *);