if (debug > 1) {
fprintf(stderr, "send_ctl: test=%d, command=%d offset=%"LL"d, length=%"LL"d, result=%d, error=%d\n",
- ctl.test, ctl.command, ctl.offset, ctl.length,ctl.result, ctl.error);
+ ctl.test, ctl.command, (long long)ctl.offset, (long long)ctl.length,ctl.result, ctl.error);
}
ctl.test= bswap_uint32(ctl.test);
if (nwrite < 0)
perror("send_ctl: write");
else
- fprintf(stderr, "send_ctl[%d]: write() returns %d, not %d as expected\n",
+ fprintf(stderr, "send_ctl[%d]: write() returns %d, not %lu as expected\n",
ctl.test, nwrite, sizeof(ctl));
exit(1);
/*NOTREACHED*/
if (nread < 0)
perror("recv_ctl: read");
else {
- fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %d as expected\n",
+ fprintf(stderr, "recv_ctl[%d]: read() returns %d, not %lu as expected\n",
ctl.test, nread, sizeof(ctl));
fprintf(stderr, "socket might has been closed by other locktest\n");
}
if (debug > 1) {
fprintf(stderr, "recv_ctl: test=%d, command=%d offset=%"LL"d, length=%"LL"d, result=%d, error=%d\n",
- ctl.test, ctl.command, ctl.offset, ctl.length, ctl.result, ctl.error);
+ ctl.test, ctl.command, (long long)ctl.offset, (long long)ctl.length, ctl.result, ctl.error);
}
}
fail_flag++;
/* We have a failure */
if(debug)
- fprintf(stderr, "Server failure in test %d, while %sing using offset %llu, length %llu - err = %d:%s\n",
+ fprintf(stderr, "Server failure in test %d, while %sing using offset %lld, length %lld - err = %d:%s\n",
ctl.test, tests[index][COMMAND]==WRLOCK?"write lock":
tests[index][COMMAND]==RDLOCK?"read lock":
tests[index][COMMAND]==UNLOCK?"unlock":
tests[index][COMMAND]==F_OPEN?"open":"clos",
- tests[index][OFFSET], tests[index][LENGTH], saved_errno, strerror(saved_errno));
- fprintf(stderr, "Server failure in %llu:%s\n",
- tests[index][TEST_NUM],
+ (long long)tests[index][OFFSET],
+ (long long)tests[index][LENGTH],
+ saved_errno, strerror(saved_errno));
+ fprintf(stderr, "Server failure in %lld:%s\n",
+ (long long)tests[index][TEST_NUM],
descriptions[tests[index][TEST_NUM] - 1]);
}
}
end=1;
}
if(debug > 1)
- fprintf(stderr, "Sending command to client (%d) - %s - %llu:%llu\n",
+ fprintf(stderr, "Sending command to client (%d) - %s - %lld:%lld\n",
index, tests[index][COMMAND]==WRLOCK?"write lock":
tests[index][COMMAND]==RDLOCK?"read lock":
tests[index][COMMAND]==UNLOCK?"unlock":
tests[index][COMMAND]==F_OPEN?"open":"clos",
- tests[index][OFFSET], tests[index][LENGTH]);
+ (long long)tests[index][OFFSET],
+ (long long)tests[index][LENGTH]);
/* get the client to do something */
ctl.index = index;
send_ctl();
if( ctl.result == FAIL ) {
fail_flag++;
if(debug)
- fprintf(stderr, "Client failure in test %d, while %sing using offset %llu, length %llu - err = %d:%s\n",
+ fprintf(stderr, "Client failure in test %d, while %sing using offset %lld, length %lld - err = %d:%s\n",
ctl.test, ctl.command==WRLOCK?"write lock":
ctl.command==RDLOCK?"read lock":
ctl.command==UNLOCK?"unlock":
ctl.command==F_OPEN?"open":"clos",
- ctl.offset, ctl.length, ctl.error, strerror(ctl.error));
- fprintf(stderr, "Client failure in %llu:%s\n",
- tests[index][TEST_NUM],
+ (long long)ctl.offset, (long long)ctl.length,
+ ctl.error, strerror(ctl.error));
+ fprintf(stderr, "Client failure in %lld:%s\n",
+ (long long)tests[index][TEST_NUM],
descriptions[tests[index][TEST_NUM] - 1]);
}
}
}
if( result != tests[index][RESULT] ) {
if(debug)
- fprintf(stderr,"Got %d, wanted %llu\n", result, tests[index][RESULT]);
+ fprintf(stderr,"Got %d, wanted %lld\n", result,
+ (long long)tests[index][RESULT]);
ctl.result = FAIL;
ctl.error = saved_errno;
fail_count++;