This commit is contained in:
Philippe Teuwen 2017-02-18 13:05:59 +01:00
parent f184407cc5
commit e4df2f3334
16 changed files with 121 additions and 120 deletions

View file

@ -310,7 +310,7 @@ read_card(int read_unlocked)
uint32_t uiReadBlocks = 0;
if (read_unlocked) {
//If the user is attempting an unlocked read, but has a direct-write type magic card, they don't
//If the user is attempting an unlocked read, but has a direct-write type magic card, they don't
//need to use the R mode. We'll trigger a warning and let them proceed.
if (magic2) {
printf("Note: This card does not require an unlocked write (R) \n");
@ -318,11 +318,11 @@ read_card(int read_unlocked)
} else {
//If User has requested an unlocked read, but we're unable to unlock the card, we'll error out.
if (!unlock_card()) {
return false;
return false;
}
}
}
printf("Reading out %d blocks |", uiBlocks + 1);
// Read the card from end to begin
for (iBlock = uiBlocks; iBlock >= 0; iBlock--) {
@ -390,7 +390,7 @@ write_card(int write_block_zero)
uint32_t uiWriteBlocks = 0;
if (write_block_zero) {
//If the user is attempting an unlocked write, but has a direct-write type magic card, they don't
//If the user is attempting an unlocked write, but has a direct-write type magic card, they don't
//need to use the W mode. We'll trigger a warning and let them proceed.
if (magic2) {
printf("Note: This card does not require an unlocked write (W) \n");
@ -398,11 +398,11 @@ write_card(int write_block_zero)
} else {
//If User has requested an unlocked write, but we're unable to unlock the card, we'll error out.
if (!unlock_card()) {
return false;
return false;
}
}
}
printf("Writing %d blocks |", uiBlocks + 1);
// Write the card from begin to end;
for (uiBlock = 0; uiBlock <= uiBlocks; uiBlock++) {