case ERROR_FILE_INVALID:
return ENXIO;
default:
- log_err("fio: windows error %d not handled\n", winerr);
+ log_err("fio: windows error %lu not handled\n", winerr);
return EIO;
}
if (error == ERROR_INSUFFICIENT_BUFFER)
processor_info = malloc(len);
else {
- log_err("Error: GetLogicalProcessorInformation failed: %d\n", error);
+ log_err("Error: GetLogicalProcessorInformation failed: %lu\n",
+ error);
return -1;
}
int nice(int incr)
{
DWORD prioclass = NORMAL_PRIORITY_CLASS;
-
+
if (incr < -15)
prioclass = HIGH_PRIORITY_CLASS;
else if (incr < 0)
prioclass = IDLE_PRIORITY_CLASS;
else if (incr > 0)
prioclass = BELOW_NORMAL_PRIORITY_CLASS;
-
+
if (!SetPriorityClass(GetCurrentProcess(), prioclass))
log_err("fio: SetPriorityClass failed\n");
FD_ZERO(&exceptfds);
for (i = 0; i < nfds; i++) {
- if (fds[i].fd < 0) {
+ if (fds[i].fd == INVALID_SOCKET) {
fds[i].revents = 0;
continue;
}
if (rc != SOCKET_ERROR) {
for (i = 0; i < nfds; i++) {
- if (fds[i].fd < 0)
+ if (fds[i].fd == INVALID_SOCKET)
continue;
if ((fds[i].events & POLLIN) && FD_ISSET(fds[i].fd, &readfds))