Skip to content

Commit

Permalink
block/iscsi.c: Fix printf format error.
Browse files Browse the repository at this point in the history
The error on armv7hl was:

block/iscsi.c: In function ‘is_request_lun_aligned’:
block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=]
                          iscsilun->block_size, sector_num, nb_sectors);
                          ^

This also splits the long line to comply with qemu coding guidelines.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
rwmjones authored and Michael Tokarev committed Aug 2, 2013
1 parent e8ef31a commit f507522
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion block/iscsi.c
Expand Up @@ -247,7 +247,9 @@ static bool is_request_lun_aligned(int64_t sector_num, int nb_sectors,
{
if ((sector_num * BDRV_SECTOR_SIZE) % iscsilun->block_size ||
(nb_sectors * BDRV_SECTOR_SIZE) % iscsilun->block_size) {
error_report("iSCSI misaligned request: iscsilun->block_size %u, sector_num %ld, nb_sectors %d",
error_report("iSCSI misaligned request: "
"iscsilun->block_size %u, sector_num %" PRIi64
", nb_sectors %d",
iscsilun->block_size, sector_num, nb_sectors);
return 0;
}
Expand Down

0 comments on commit f507522

Please sign in to comment.