Skip to content

Commit

Permalink
CmdWriteNandRaw: add user confirmation before writing
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Mar 16, 2018
1 parent 3ad76cf commit 590865d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion iQueDiagExtend/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ int CmdWriteNandRaw()
return 0;
}

printf("writing nand.bin/spare.bin to device...\n");
printf("write nand.bin/spare.bin to the device? (y/n)\n");
int answer = getchar();
if (answer != 'Y' && answer != 'y')
{
fclose(nand);
fclose(spare);
printf("write aborted\n");
return 0;
}

printf("writing nand.bin/spare.bin...\n");

unsigned char buff[0x4000];
unsigned char sparebuff[0x10];
Expand Down

0 comments on commit 590865d

Please sign in to comment.