summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorajs <ajs>2004-11-20 02:06:59 +0000
committerajs <ajs>2004-11-20 02:06:59 +0000
commita113290b29b12bc66ed2d726b7d2ff971b50b8f2 (patch)
tree9e742d207a6a74c84738e9abf86dbb804e399293 /vtysh
parentd3cd86f5876e014e59268b60e8077d7e8b4f5332 (diff)
downloadquagga-a113290b29b12bc66ed2d726b7d2ff971b50b8f2.tar.bz2
quagga-a113290b29b12bc66ed2d726b7d2ff971b50b8f2.tar.xz
2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c7271ff0..08bd1275 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -33,6 +33,7 @@
#include "command.h"
#include "memory.h"
#include "vtysh/vtysh.h"
+#include "log.h"
/* Struct VTY. */
struct vty *vty;
@@ -1562,7 +1563,7 @@ int write_config_integrated(void)
if (chmod (integrate_default, CONFIGFILE_MASK) != 0)
{
fprintf (stdout,"%% Can't chmod configuration file %s: %s (%d)\n",
- integrate_default, strerror(errno), errno);
+ integrate_default, safe_strerror(errno), errno);
return CMD_WARNING;
}
@@ -1715,7 +1716,7 @@ execute_command (const char *command, int argc, const char *arg1,
if (pid < 0)
{
/* Failure of fork(). */
- fprintf (stderr, "Can't fork: %s\n", strerror (errno));
+ fprintf (stderr, "Can't fork: %s\n", safe_strerror (errno));
exit (1);
}
else if (pid == 0)
@@ -1735,7 +1736,7 @@ execute_command (const char *command, int argc, const char *arg1,
}
/* When execlp suceed, this part is not executed. */
- fprintf (stderr, "Can't execute %s: %s\n", command, strerror (errno));
+ fprintf (stderr, "Can't execute %s: %s\n", command, safe_strerror (errno));
exit (1);
}
else
@@ -1893,7 +1894,7 @@ vtysh_connect (struct vtysh_client *vclient, const char *path)
if (ret < 0 && errno != ENOENT)
{
fprintf (stderr, "vtysh_connect(%s): stat = %s\n",
- path, strerror(errno));
+ path, safe_strerror(errno));
exit(1);
}
@@ -1913,7 +1914,7 @@ vtysh_connect (struct vtysh_client *vclient, const char *path)
{
#ifdef DEBUG
fprintf(stderr, "vtysh_connect(%s): socket = %s\n", path,
- strerror(errno));
+ safe_strerror(errno));
#endif /* DEBUG */
return -1;
}
@@ -1932,7 +1933,7 @@ vtysh_connect (struct vtysh_client *vclient, const char *path)
{
#ifdef DEBUG
fprintf(stderr, "vtysh_connect(%s): connect = %s\n", path,
- strerror(errno));
+ safe_strerror(errno));
#endif /* DEBUG */
close (sock);
return -1;