mirror of
https://github.com/rvtr/SafeNANDManager.git
synced 2026-01-26 13:43:04 -05:00
Do not continuously print progress text
This commit is contained in:
parent
076ddaa0b7
commit
dcf6dca5bb
@ -90,7 +90,8 @@ int dumpNAND(nocash_footer_t *footer){
|
|||||||
|
|
||||||
iprintf("Dumping...\n");
|
iprintf("Dumping...\n");
|
||||||
iprintf("Hold A & B to cancel\n");
|
iprintf("Hold A & B to cancel\n");
|
||||||
iprintf("Progress: 0%% \r");
|
iprintf("\x1b[16;0H");
|
||||||
|
iprintf("Progress: 0%%\n");
|
||||||
swiSHA1Init(&ctx);
|
swiSHA1Init(&ctx);
|
||||||
|
|
||||||
for(int i=0;i<rwTotal;i+=CHUNKSIZE){ //read from nand, dump to sd
|
for(int i=0;i<rwTotal;i+=CHUNKSIZE){ //read from nand, dump to sd
|
||||||
@ -109,7 +110,8 @@ int dumpNAND(nocash_footer_t *footer){
|
|||||||
fail=1;
|
fail=1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iprintf("Progress: %lu%% \r", (i+CHUNKSIZE)/(rwTotal/100));
|
iprintf("\x1b[16;0H");
|
||||||
|
iprintf("Progress: %lu%%\n", (i+CHUNKSIZE)/(rwTotal/100));
|
||||||
scanKeys();
|
scanKeys();
|
||||||
int keys = keysHeld();
|
int keys = keysHeld();
|
||||||
if(keys & KEY_A && keys & KEY_B){
|
if(keys & KEY_A && keys & KEY_B){
|
||||||
@ -174,7 +176,8 @@ int restoreNAND(nocash_footer_t *footer){
|
|||||||
|
|
||||||
iprintf("Restoring... \n");
|
iprintf("Restoring... \n");
|
||||||
iprintf("Do not turn off the power.\n");
|
iprintf("Do not turn off the power.\n");
|
||||||
iprintf("Progress: 0%% Sectors written: 0\r");
|
iprintf("\x1b[16;0H");
|
||||||
|
iprintf("Progress: 0%%\nSectors written: 0\n");
|
||||||
|
|
||||||
int i2=0;
|
int i2=0;
|
||||||
for(int i=0;i<rwTotal;i+=0x200){ //read nand dump from sd, compare sectors, and write to nand
|
for(int i=0;i<rwTotal;i+=0x200){ //read nand dump from sd, compare sectors, and write to nand
|
||||||
@ -199,7 +202,8 @@ int restoreNAND(nocash_footer_t *footer){
|
|||||||
}
|
}
|
||||||
sectorsWritten++;
|
sectorsWritten++;
|
||||||
}
|
}
|
||||||
iprintf("Progress: %lu%% Sectors written: %i\r", (i+0x200)/(rwTotal/100), sectorsWritten);
|
iprintf("\x1b[16;0H");
|
||||||
|
iprintf("Progress: %lu%%\nSectors written: %i\n", (i+0x200)/(rwTotal/100), sectorsWritten);
|
||||||
i2++;
|
i2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user