Merge pull request #221 from hramrach/master

Fix 32bit build.
This commit is contained in:
Ronnie Sahlberg
2016-11-14 12:40:03 -08:00
committed by GitHub
4 changed files with 10 additions and 9 deletions

View File

@@ -23,6 +23,7 @@
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <inttypes.h>
#include "iscsi.h"
#include "iser-private.h"
#include "iscsi-private.h"
@@ -524,7 +525,7 @@ iser_prepare_read_cmd(struct iser_conn *iser_conn,struct iser_pdu *iser_pdu)
}
tx_desc->data_dir = DATA_READ;
hdr->read_va = htobe64((uint64_t)tx_desc->data_buff);
hdr->read_va = htobe64((intptr_t)tx_desc->data_buff);
hdr->read_stag = htobe32((uint32_t)tx_desc->data_mr->rkey);
hdr->flags |= ISER_RSV;
@@ -565,7 +566,7 @@ iser_prepare_write_cmd(struct iser_conn *iser_conn, struct iser_pdu *iser_pdu)
hdr->flags |= ISER_WSV;
hdr->write_stag = htobe32((uint32_t)(tx_desc->data_mr->rkey));
hdr->write_va = htobe64((uint64_t)(tx_desc->data_buff));
hdr->write_va = htobe64((intptr_t)(tx_desc->data_buff));
return 0;
}
@@ -1146,7 +1147,7 @@ static int iser_handle_wc(struct ibv_wc *wc,struct iser_conn *iser_conn)
wc->wr_id, wc->status, wc->vendor_err);
return iscsi_service_reconnect_if_loggedin(iscsi);
} else {
iscsi_set_error(iscsi, "flush error: wr id %lx\n", wc->wr_id);
iscsi_set_error(iscsi, "flush error: wr id %" PRIx64 "\n", wc->wr_id);
return 0;
}

View File

@@ -64,7 +64,7 @@ test_compareandwrite_invalid_dataout_size(void)
logging(LOG_VERBOSE, "Check too small DataOut");
logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%ld (4 blocks) "
logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%zd (4 blocks) "
"and TL == 1 ", 4 * block_size);
new_tl = 1;
@@ -74,7 +74,7 @@ test_compareandwrite_invalid_dataout_size(void)
EXPECT_STATUS_GENERIC_BAD);
logging(LOG_VERBOSE, "Check too large DataOut");
logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%ld (4 blocks) "
logging(LOG_VERBOSE, "COMPAREANDWRITE with DataOut==%zd (4 blocks) "
"and TL == 3 ", 4 * block_size);
new_tl = 2;

View File

@@ -41,13 +41,13 @@ test_writesame10_invalid_dataout_size(void)
memset(scratch, 0xa6, block_size);
logging(LOG_VERBOSE, "Check too small DataOut");
logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)",
logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)",
block_size / 2, block_size);
WRITESAME10(sd, 0, block_size / 2, 1, 0, 1, 0, 0, scratch,
EXPECT_STATUS_GENERIC_BAD);
logging(LOG_VERBOSE, "Check too large DataOut");
logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)",
logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)",
block_size * 2, block_size);
WRITESAME10(sd, 0, block_size * 2, 1, 0, 1, 0, 0, scratch,
EXPECT_STATUS_GENERIC_BAD);

View File

@@ -41,13 +41,13 @@ test_writesame16_invalid_dataout_size(void)
memset(scratch, 0xa6, block_size);
logging(LOG_VERBOSE, "Check too small DataOut");
logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)",
logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)",
block_size / 2, block_size);
WRITESAME16(sd, 0, block_size / 2, 1, 0, 1, 0, 0, scratch,
EXPECT_STATUS_GENERIC_BAD);
logging(LOG_VERBOSE, "Check too large DataOut");
logging(LOG_VERBOSE, "Unmap with DataOut==%ld (block_size==%ld)",
logging(LOG_VERBOSE, "Unmap with DataOut==%zd (block_size==%zd)",
block_size * 2, block_size);
WRITESAME16(sd, 0, block_size * 2, 1, 0, 1, 0, 0, scratch,
EXPECT_STATUS_GENERIC_BAD);