snprintf(from, MAXPATHLEN, "%s.%d", debug_log_file, i - 1);
snprintf(to, MAXPATHLEN, "%s.%d", debug_log_file, i);
#if _SQUID_WINDOWS_
- remove
- (to);
+ remove(to);
#endif
errno = 0;
if (rename(from, to) == -1) {
- debugs(0, DBG_IMPORTANT, "log rotation failed: " << xstrerror());
+ debugs(0, DBG_IMPORTANT, "log rotation failed: " << xstrerr(errno));
}
}
if (fdd->write_q->file_offset != -1) {
errno = 0;
if (lseek(fd, fdd->write_q->file_offset, SEEK_SET) == -1) {
- debugs(50, DBG_IMPORTANT, "error in seek for fd " << fd << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "error in seek for fd " << fd << ": " << xstrerr(errno));
// XXX: handle error?
}
}
errno = 0;
if (lseek(fd, ctrl_dat->offset, SEEK_SET) == -1) {
// shouldn't happen, let's detect that
- debugs(50, DBG_IMPORTANT, "error in seek for fd " << fd << ": " << xstrerror());
+ debugs(50, DBG_IMPORTANT, "error in seek for fd " << fd << ": " << xstrerr(errno));
// XXX handle failures?
}
++ statCounter.syscalls.disk.seeks;
errno = 0;
if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, (void *) &buflen, sizeof(buflen)) == -1) {
- debugs(54, DBG_IMPORTANT, "setsockopt failed: " << xstrerror());
+ debugs(54, DBG_IMPORTANT, "setsockopt(fds[0],snd) failed: " << xstrerr(errno));
errno = 0;
}
if (setsockopt(fds[0], SOL_SOCKET, SO_RCVBUF, (void *) &buflen, sizeof(buflen)) == -1) {
- debugs(54, DBG_IMPORTANT, "setsockopt failed: " << xstrerror());
+ debugs(54, DBG_IMPORTANT, "setsockopt(fds[0],rcv) failed: " << xstrerr(errno));
errno = 0;
}
if (setsockopt(fds[1], SOL_SOCKET, SO_SNDBUF, (void *) &buflen, sizeof(buflen)) == -1) {
- debugs(54, DBG_IMPORTANT, "setsockopt failed: " << xstrerror());
+ debugs(54, DBG_IMPORTANT, "setsockopt(fds[1],snd) failed: " << xstrerr(errno));
errno = 0;
}
if (setsockopt(fds[1], SOL_SOCKET, SO_RCVBUF, (void *) &buflen, sizeof(buflen)) == -1) {
- debugs(54, DBG_IMPORTANT, "setsockopt failed: " << xstrerror());
+ debugs(54, DBG_IMPORTANT, "setsockopt(fds[1],rcv) failed: " << xstrerr(errno));
errno = 0;
}
fd_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX STREAM Parent");