src/wd2010.c

changeset 136
f7d78dfb45d0
parent 134
b826697f411a
child 148
b0eac383e342
     1.1 diff -r b826697f411a -r f7d78dfb45d0 src/wd2010.c
     1.2 --- a/src/wd2010.c	Wed Mar 13 00:43:25 2013 +0000
     1.3 +++ b/src/wd2010.c	Thu Apr 11 09:18:31 2013 +0100
     1.4 @@ -239,7 +239,7 @@
     1.5  			if (ctx->cmd_has_drq) {
     1.6  				temp = ctx->status & ~(SR_BUSY & SR_DRQ);
     1.7  				temp |= (ctx->data_pos < ctx->data_len) ? SR_DRQ : 0;
     1.8 -				LOG("\tWDFDC rd sr, has drq, pos=%lu len=%lu, sr=0x%02X", ctx->data_pos, ctx->data_len, temp);
     1.9 +				LOG("\tWDFDC rd sr, has drq, pos=%zu len=%zu, sr=0x%02X", ctx->data_pos, ctx->data_len, temp);
    1.10  			} else {
    1.11  				temp = ctx->status & ~0x80;
    1.12  			}
    1.13 @@ -379,13 +379,13 @@
    1.14  								lba = (((ctx->track * ctx->geom_heads * ctx->geom_spt) + (ctx->head * ctx->geom_spt) + ctx->sector) + i);
    1.15  								// convert LBA to byte address
    1.16  								lba *= ctx->geom_secsz;
    1.17 -								LOG("\tREAD lba = %lu", lba);
    1.18 +								LOG("\tREAD lba = %zu", lba);
    1.19  
    1.20  								// Read the sector from the file
    1.21  								fseek(ctx->disc_image, lba, SEEK_SET);
    1.22  								// TODO: check fread return value! if < secsz, BAIL! (call it a crc error or secnotfound maybe? also log to stderr)
    1.23  								ctx->data_len += fread(&ctx->data[ctx->data_len], 1, ctx->geom_secsz, ctx->disc_image);
    1.24 -								LOG("\tREAD len=%lu, pos=%lu, ssz=%d", ctx->data_len, ctx->data_pos, ctx->geom_secsz);
    1.25 +								LOG("\tREAD len=%zu, pos=%zu, ssz=%d", ctx->data_len, ctx->data_pos, ctx->geom_secsz);
    1.26  							}
    1.27  
    1.28  							ctx->status = 0;