--- archive.c 2001/01/19 08:27:49 1.6
+++ archive.c 2001/01/19 21:21:41 1.7
@@ -1,6 +1,6 @@
/*
$Source: /v/ossp/cvs/ossp-pkg/petidomo/archive.c,v $
- $Revision: 1.6 $
+ $Revision: 1.7 $
Copyright (C) 2000 by CyberSolutions GmbH, Germany.
@@ -34,7 +34,7 @@
struct stat sb;
FILE * fh;
char * filename;
- u_int counter;
+ unsigned int counter;
int rc;
struct tm * timeptr;
char * date;
@@ -74,7 +74,7 @@
else
{
if (errno != ENOENT)
- syslog(LOG_ERR, "Failed to read file \"%s\": %m", filename);
+ syslog(LOG_ERR, "Failed to read file \"%s\": %s", filename, strerror(errno));
else
counter = 0;
}
@@ -98,13 +98,13 @@
rc = 0;
}
else
- syslog(LOG_ERR, "Failed opening file \"%s\" for writing: %m", filename);
+ syslog(LOG_ERR, "Failed opening file \"%s\" for writing: %s", filename, strerror(errno));
break;
}
else
{
syslog(LOG_ERR, "An error while trying to access the log " \
- "directory \"%s\": %m", ListConfig->archivepath);
+ "directory \"%s\": %s", ListConfig->archivepath, strerror(errno));
break;
}
}
@@ -122,7 +122,7 @@
fclose(fh);
}
else
- syslog(LOG_ERR, "Failed to write to file \"%s\": %m", filename);
+ syslog(LOG_ERR, "Failed to write to file \"%s\": %s", filename, strerror(errno));
}
else
{
@@ -141,7 +141,7 @@
rc = 0;
}
else
- syslog(LOG_ERR, "Failed opening file \"%s\" for writing: %m", ListConfig->archivepath);
+ syslog(LOG_ERR, "Failed opening file \"%s\" for writing: %s", ListConfig->archivepath, strerror(errno));
}
return rc;
|