diff options
Diffstat (limited to 'lib/vty.c')
| -rw-r--r-- | lib/vty.c | 31 |
1 files changed, 17 insertions, 14 deletions
@@ -2287,7 +2287,8 @@ static void vty_read_file(FILE *confp) message = "Command returned Incomplete"; break; case CMD_ERR_EXEED_ARGC_MAX: - message = "Command exceeded maximum number of Arguments"; + message = + "Command exceeded maximum number of Arguments"; break; default: message = "Command returned unhandled error message"; @@ -2297,8 +2298,8 @@ static void vty_read_file(FILE *confp) nl = strchr(vty->error_buf, '\n'); if (nl) *nl = '\0'; - zlog_err("ERROR: %s on config line %u: %s", - message, line_num, vty->error_buf); + zlog_err("ERROR: %s on config line %u: %s", message, line_num, + vty->error_buf); } vty_close(vty); @@ -2370,7 +2371,8 @@ void vty_read_config(const char *config_file, char *config_default_dir) if (config_file != NULL) { if (!IS_DIRECTORY_SEP(config_file[0])) { if (getcwd(cwd, MAXPATHLEN) == NULL) { - zlog_err("Failure to determine Current Working Directory %d!", + zlog_err( + "Failure to determine Current Working Directory %d!", errno); exit(1); } @@ -2385,14 +2387,15 @@ void vty_read_config(const char *config_file, char *config_default_dir) if (confp == NULL) { zlog_err("%s: failed to open configuration file %s: %s", - __func__, fullpath, safe_strerror(errno)); + __func__, fullpath, safe_strerror(errno)); confp = vty_use_backup_config(fullpath); if (confp) - zlog_warn("WARNING: using backup configuration file!"); + zlog_warn( + "WARNING: using backup configuration file!"); else { zlog_err("can't open configuration file [%s]", - config_file); + config_file); exit(1); } } @@ -2427,16 +2430,17 @@ void vty_read_config(const char *config_file, char *config_default_dir) confp = fopen(config_default_dir, "r"); if (confp == NULL) { zlog_err("%s: failed to open configuration file %s: %s", - __func__, config_default_dir, - safe_strerror(errno)); + __func__, config_default_dir, + safe_strerror(errno)); confp = vty_use_backup_config(config_default_dir); if (confp) { - zlog_warn("WARNING: using backup configuration file!"); + zlog_warn( + "WARNING: using backup configuration file!"); fullpath = config_default_dir; } else { zlog_err("can't open configuration file [%s]", - config_default_dir); + config_default_dir); goto tmp_free_and_out; } } else @@ -2946,12 +2950,11 @@ static void vty_save_cwd(void) */ if (!chdir(SYSCONFDIR)) { zlog_err("Failure to chdir to %s, errno: %d", - SYSCONFDIR, errno); + SYSCONFDIR, errno); exit(-1); } if (getcwd(cwd, MAXPATHLEN) == NULL) { - zlog_err("Failure to getcwd, errno: %d", - errno); + zlog_err("Failure to getcwd, errno: %d", errno); exit(-1); } } |
