summaryrefslogtreecommitdiffstats
path: root/lib/command.h
diff options
context:
space:
mode:
authorSteve Hill <quagga@cheesy.sackheads.org>2009-07-28 16:36:14 -0400
committerPaul Jakma <paul@quagga.net>2014-09-19 22:14:54 +0100
commitea55500409651b0f8fd2c8a02fdbf245acc96dd8 (patch)
tree74f195200f595ae96363e007103e77654ace3f4d /lib/command.h
parentd4a8607d12e1d3f655055647f1633ec154685545 (diff)
downloadquagga-ea55500409651b0f8fd2c8a02fdbf245acc96dd8.tar.bz2
quagga-ea55500409651b0f8fd2c8a02fdbf245acc96dd8.tar.xz
lib: Improve error reporting from broken config files
* command.h: (config_from_file) Add variable to interface for line number reporting. * command.c: (config_from_file) Set & increment 'line_num' while parsing. * vty.c: (vty_read_file) Report parse errors in the correct order to stderr, with added line numbers.
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/command.h b/lib/command.h
index e47c4255..8dc50d0d 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -518,7 +518,7 @@ extern void cmd_free_strvec (vector);
extern vector cmd_describe_command (vector, struct vty *, int *status);
extern char **cmd_complete_command (vector, struct vty *, int *status);
extern const char *cmd_prompt (enum node_type);
-extern int config_from_file (struct vty *, FILE *);
+extern int config_from_file (struct vty *, FILE *, unsigned int *line_num);
extern enum node_type node_parent (enum node_type);
extern int cmd_execute_command (vector, struct vty *, struct cmd_element **, int);
extern int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **);