#endif
if (printBanner && (++msg & 1)) { /* Every 10 minutes */
time_t now = FT_ApproxTime();
+ struct tm tm;
+ strftime(tbuffer, sizeof(tbuffer), "%a %b %d %T %Y",
+ localtime_r(&now, &tm));
ViceLog(2,
- ("File server is running at %s\n",
- afs_ctime(&now, tbuffer, sizeof(tbuffer))));
+ ("File server is running at %s\n", tbuffer));
}
#ifdef AFS_DEMAND_ATTACH_FS
FS_STATE_WRLOCK;
int workstations, activeworkstations, delworkstations;
int processSize = 0;
char tbuffer[32];
+ struct tm tm;
#ifdef AFS_DEMAND_ATTACH_FS
int stats_flags = 0;
#endif
FT_GetTimeOfDay(&tpl, 0);
Statistics = 1;
- ViceLog(0,
- ("Vice was last started at %s\n",
- afs_ctime(&StartTime, tbuffer, sizeof(tbuffer))));
+ strftime(tbuffer, sizeof(tbuffer), "%a %b %d %T %Y",
+ localtime_r(&StartTime, &tm));
+ ViceLog(0, ("Vice was last started at %s\n", tbuffer));
#ifdef AFS_DEMAND_ATTACH_FS
if (LogLevel >= 125) {
void
ShutDownAndCore(int dopanic)
{
- time_t now = time(0);
+ time_t now = time(NULL);
+ struct tm tm;
char tbuffer[32];
if (dopanic) {
FS_STATE_UNLOCK;
#endif
- ViceLog(0,
- ("Shutting down file server at %s",
- afs_ctime(&now, tbuffer, sizeof(tbuffer))));
+ strftime(tbuffer, sizeof(tbuffer), "%a %b %d %T %Y",
+ localtime_r(&now, &tm));
+ ViceLog(0, ("Shutting down file server at %s", tbuffer));
if (dopanic)
ViceLog(0, ("ABNORMAL SHUTDOWN, see core file.\n"));
DFlush();
fflush(debugFile);
}
now = time(0);
+ strftime(tbuffer, sizeof(tbuffer), "%a %b %d %T %Y",
+ localtime_r(&now, &tm));
if (dopanic) {
- ViceLog(0,
- ("File server has terminated abnormally at %s\n",
- afs_ctime(&now, tbuffer, sizeof(tbuffer))));
+ ViceLog(0, ("File server has terminated abnormally at %s\n", tbuffer));
} else {
- ViceLog(0,
- ("File server has terminated normally at %s\n",
- afs_ctime(&now, tbuffer, sizeof(tbuffer))));
+ ViceLog(0, ("File server has terminated normally at %s\n", tbuffer));
}
if (dopanic) /* XXX pass in file and line? */
#endif
int curLimit;
time_t t;
+ struct tm tm;
afs_uint32 rx_bindhost;
VolumePackageOptions opts;
}
t = tp.tv_sec;
- ViceLog(0,
- ("File Server started %s",
- afs_ctime(&t, tbuffer, sizeof(tbuffer))));
+ strftime(tbuffer, sizeof(tbuffer), "%a %b %d %T %Y",
+ localtime_r(&t, &tm));
+ ViceLog(0, ("File Server started %s", tbuffer));
#if FS_STATS_DETAILED
afs_FullPerfStats.det.epoch.tv_sec = StartTime = tp.tv_sec;
#endif