fix debug print statements to use correct printf types for the FCOE target Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com> Signed-off-by: root <root at ubuntu-server-1.sahlberg.net> --- usr/fcoe/fcs_state.c | 4 ++-- usr/fcoe/openfc_scst.c | 6 +++--- usr/fcoe/sa_state.c | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/usr/fcoe/fcs_state.c b/usr/fcoe/fcs_state.c index a4a065a..288280e 100644 --- a/usr/fcoe/fcs_state.c +++ b/usr/fcoe/fcs_state.c @@ -107,11 +107,11 @@ struct fcs_state *fcs_create(struct fcs_create_args *ap) outer_port = ap->fca_port; mfs = fc_port_get_max_frame_size(outer_port); if (mfs < FC_MIN_MAX_PAYLOAD) { - eprintf("port max frame size only %d (0x%x) bytes - " + eprintf("port max frame size only %zu (0x%zx) bytes - " "setting to %d", mfs, mfs, FC_MIN_MAX_PAYLOAD); mfs = 1024; } else if (mfs > FC_MAX_PAYLOAD + sizeof(struct fc_frame_header)) { - eprintf("port max frame size too large: %d (0x%x) bytes\n", + eprintf("port max frame size too large: %zu (0x%zx) bytes\n", mfs, mfs); mfs = FC_MAX_PAYLOAD + sizeof(struct fc_frame_header); } diff --git a/usr/fcoe/openfc_scst.c b/usr/fcoe/openfc_scst.c index 2cf0cdd..f24fc28 100644 --- a/usr/fcoe/openfc_scst.c +++ b/usr/fcoe/openfc_scst.c @@ -214,7 +214,7 @@ openfc_scsi_send_data(struct fc_scsi_pkt *fsp, struct fc_seq *sp) len = scsi_get_in_length(&fsp->scmd) - scsi_get_in_resid(&fsp->scmd); - dprintf("%p %d %d\n", fsp, data_len, scsi_get_in_resid(&fsp->scmd)); + dprintf("%p %zu %d\n", fsp, data_len, scsi_get_in_resid(&fsp->scmd)); len = min(data_len, len); if (offset != fsp->xfer_len) { @@ -242,7 +242,7 @@ openfc_scsi_send_data(struct fc_scsi_pkt *fsp, struct fc_seq *sp) fc_frame_set_offset(fp, buf_offset); } - dprintf("%d %d %d\n", tlen, remaining, buf_offset); + dprintf("%zu %zu %zu\n", tlen, remaining, buf_offset); page_addr = (char *)scsi_get_in_buffer(&fsp->scmd) + buf_offset; memcpy(data, (char *) page_addr, tlen); @@ -260,7 +260,7 @@ openfc_scsi_send_data(struct fc_scsi_pkt *fsp, struct fc_seq *sp) continue; } - dprintf("%d %d %d\n", tlen, remaining, error); + dprintf("%zu %zu %d\n", tlen, remaining, error); fp = NULL; if (error) { /* diff --git a/usr/fcoe/sa_state.c b/usr/fcoe/sa_state.c index 95dbe03..ad7ef98 100644 --- a/usr/fcoe/sa_state.c +++ b/usr/fcoe/sa_state.c @@ -116,7 +116,7 @@ struct sa_state_table *sa_state_table_alloc(const char *name, case SST_STATE: if (dp->sd_in == 0) { eprintf("state table %s has invalid state %d " - "at STATE entry %d", + "at STATE entry %ld", name, dp->sd_in, dp - state_desc); error++; } @@ -127,7 +127,7 @@ struct sa_state_table *sa_state_table_alloc(const char *name, case SST_FROM: if (dp->sd_in == 0) { eprintf("state table %s has invalid state %d " - "at FROM entry %d", + "at FROM entry %ld", name, dp->sd_in, dp - state_desc); error++; } @@ -136,7 +136,7 @@ struct sa_state_table *sa_state_table_alloc(const char *name, case SST_EVENT: if (dp->sd_in == 0) { eprintf("state table %s has invalid event %d " - "at EVENT entry %d", + "at EVENT entry %ld", name, dp->sd_in, dp - state_desc); error++; } @@ -146,7 +146,7 @@ struct sa_state_table *sa_state_table_alloc(const char *name, case SST_HANDLER: if (dp->sd_ptr == NULL) { eprintf("state table %s has invalid hander %d " - "at HANDLER entry %d", + "at HANDLER entry %ld", name, dp->sd_in, dp - state_desc); error++; } @@ -156,19 +156,19 @@ struct sa_state_table *sa_state_table_alloc(const char *name, case SST_NEXT: if (cur_state == 0) { eprintf("state table %s has no current state " - "for NEXT entry %d", + "for NEXT entry %ld", name, dp - state_desc); error++; } if (dp->sd_in >= event_limit) { eprintf("state table %s has event %d " - "out of range at NEXT entry %d", + "out of range at NEXT entry %ld", name, dp->sd_in, dp - state_desc); error++; } if (dp->sd_next == 0 || dp->sd_next >= state_limit) { eprintf("state table %s has state %d " - "out of range at NEXT entry %d", + "out of range at NEXT entry %ld", name, dp->sd_next, dp - state_desc); error++; } -- 1.5.4.3 ------=_Part_14794_16303730.1214781861281 Content-Type: application/x-gzip; name=0001-size_t-is-64-bit-on-some-architectures.patch.gz Content-Transfer-Encoding: base64 X-Attachment-Id: f_fi29k51y0 Content-Disposition: attachment; filename=0001-size_t-is-64-bit-on-some-architectures.patch.gz RnJvbSBhMGQ5M2U3MWVjZTIxYjQ0Y2IwYzJlZmNmYjFmOTQyMjUyOTliZmJjIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSb25uaWUgU2FobGJlcmcgPHJvbm5pZXNhaGxiZXJnQGdtYWls LmNvbT4KRGF0ZTogVHVlLCAyNCBKdW4gMjAwOCAxMzoxMTo1MCArMTAwMApTdWJqZWN0OiBbUEFU Q0ggMS8yXSBzaXplX3QgaXMgNjQgYml0IG9uIHNvbWUgYXJjaGl0ZWN0dXJlcy4KCmZpeCBkZWJ1 ZyBwcmludCBzdGF0ZW1lbnRzIHRvIHVzZSBjb3JyZWN0IHByaW50ZiB0eXBlcyBmb3IgdGhlIEZD T0UKdGFyZ2V0CgpTaWduZWQtb2ZmLWJ5OiBSb25uaWUgU2FobGJlcmcgPHJvbm5pZXNhaGxiZXJn QGdtYWlsLmNvbT4KU2lnbmVkLW9mZi1ieTogcm9vdCA8cm9vdEB1YnVudHUtc2VydmVyLTEuc2Fo bGJlcmcubmV0PgotLS0KIHVzci9mY29lL2Zjc19zdGF0ZS5jICAgfCAgICA0ICsrLS0KIHVzci9m Y29lL29wZW5mY19zY3N0LmMgfCAgICA2ICsrKy0tLQogdXNyL2Zjb2Uvc2Ffc3RhdGUuYyAgICB8 ICAgMTQgKysrKysrKy0tLS0tLS0KIDMgZmlsZXMgY2hhbmdlZCwgMTIgaW5zZXJ0aW9ucygrKSwg MTIgZGVsZXRpb25zKC0pCgpkaWZ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