iscsi-util.c: use PRIu64 instead of llu

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-03-02 19:46:46 -08:00
parent a6b301cfdf
commit 7ffce43dc9

View File

@@ -91,12 +91,12 @@ void progress(struct client *client) {
uint64_t aiops = 1000000000UL * (client->iops) / (now - client->first_ns);
if (!_runtime) {
finished = 1;
printf ("iops average %llu (%llu MB/s) ", aiops, (aiops * blocks_per_io * client->blocksize) >> 20);
printf ("iops average %" PRIu64 " (%" PRIu64 " MB/s) ", aiops, (aiops * blocks_per_io * client->blocksize) >> 20);
} else {
uint64_t iops = 1000000000UL * (client->iops - client->last_iops) / (now - client->last_ns);
printf ("%02llu:%02llu:%02llu - ", (_runtime % 3600) / 60, _runtime / 60, _runtime % 60);
printf ("lba %llu, iops current %llu (%llu MB/s), ", client->pos, iops, (iops * blocks_per_io * client->blocksize) >> 20);
printf ("iops average %llu (%llu MB/s) ", aiops, (aiops * blocks_per_io * client->blocksize) >> 20);
printf ("%02" PRIu64 ":%02" PRIu64 ":%02" PRIu64 " - ", (_runtime % 3600) / 60, _runtime / 60, _runtime % 60);
printf ("lba %" PRIu64 ", iops current %" PRIu64 " (%" PRIu64 " MB/s), ", client->pos, iops, (iops * blocks_per_io * client->blocksize) >> 20);
printf ("iops average %" PRIu64 " (%" PRIu64 " MB/s) ", aiops, (aiops * blocks_per_io * client->blocksize) >> 20);
}
fflush(stdout);
client->last_ns = now;
@@ -289,14 +289,14 @@ int main(int argc, char *argv[])
scsi_free_scsi_task(task);
printf("capacity is %llu blocks or %llu byte (%llu MB)\n", client.num_blocks, client.num_blocks * client.blocksize,
printf("capacity is %" PRIu64 " blocks or %" PRIu64 " byte (%" PRIu64 " MB)\n", client.num_blocks, client.num_blocks * client.blocksize,
(client.num_blocks * client.blocksize) >> 20);
printf("performing %s READ with %d parallel requests\nfixed transfer size of %d blocks (%d byte)\n",
client.random ? "random" : "sequential", max_in_flight, blocks_per_io, blocks_per_io * client.blocksize);
if (runtime) {
printf("will run for %llu seconds.\n", runtime);
printf("will run for %" PRIu64 " seconds.\n", runtime);
} else {
printf("infinite runtime - press CTRL-C to abort.\n");
}