|
...
|
...
|
@@ -498,11 +498,11 @@ static int dmg_decode_mish(cli_ctx *ctx, unsigned int *mishblocknum, xmlChar *mi
|
|
498
|
498
|
|
|
499
|
499
|
(*mishblocknum)++;
|
|
500
|
500
|
base64_len = strlen(mish_base64);
|
|
501
|
|
- cli_dbgmsg("dmg_decode_mish: len of encoded block %u is %lu\n", *mishblocknum, base64_len);
|
|
|
501
|
+ dmg_parsemsg("dmg_decode_mish: len of encoded block %u is %lu\n", *mishblocknum, base64_len);
|
|
502
|
502
|
|
|
503
|
503
|
/* speed vs memory, could walk the encoded data and skip whitespace in calculation */
|
|
504
|
504
|
buff_size = 3 * base64_len / 4 + 4;
|
|
505
|
|
- cli_dbgmsg("dmg_decode_mish: buffer for mish block %u is %lu\n", *mishblocknum, (unsigned long)buff_size);
|
|
|
505
|
+ dmg_parsemsg("dmg_decode_mish: buffer for mish block %u is %lu\n", *mishblocknum, (unsigned long)buff_size);
|
|
506
|
506
|
decoded = cli_malloc(buff_size);
|
|
507
|
507
|
if (!decoded)
|
|
508
|
508
|
return CL_EMEM;
|
|
...
|
...
|
@@ -512,7 +512,7 @@ static int dmg_decode_mish(cli_ctx *ctx, unsigned int *mishblocknum, xmlChar *mi
|
|
512
|
512
|
free(decoded);
|
|
513
|
513
|
return CL_EFORMAT;
|
|
514
|
514
|
}
|
|
515
|
|
- cli_dbgmsg("dmg_decode_mish: len of decoded mish block %u is %lu\n", *mishblocknum, (unsigned long)decoded_len);
|
|
|
515
|
+ dmg_parsemsg("dmg_decode_mish: len of decoded mish block %u is %lu\n", *mishblocknum, (unsigned long)decoded_len);
|
|
516
|
516
|
|
|
517
|
517
|
if (decoded_len < sizeof(struct dmg_mish_block)) {
|
|
518
|
518
|
cli_dbgmsg("dmg_decode_mish: block %u too short for valid mish block\n", *mishblocknum);
|
|
...
|
...
|
@@ -535,11 +535,10 @@ static int dmg_decode_mish(cli_ctx *ctx, unsigned int *mishblocknum, xmlChar *mi
|
|
535
|
535
|
// mish_set->mish->bufferCount = be32_to_host(mish_set->mish->bufferCount);
|
|
536
|
536
|
mish_set->mish->blockDataCount = be32_to_host(mish_set->mish->blockDataCount);
|
|
537
|
537
|
|
|
538
|
|
- cli_dbgmsg("dmg_decode_mish: startSector = %lu\n", mish_set->mish->startSector);
|
|
539
|
|
- cli_dbgmsg("dmg_decode_mish: sectorCount = %lu\n", mish_set->mish->sectorCount);
|
|
540
|
|
- cli_dbgmsg("dmg_decode_mish: dataOffset = %lu\n", mish_set->mish->dataOffset);
|
|
541
|
|
- // cli_dbgmsg("dmg_decode_mish: bufferCount = %lu\n", mish_set->mish->bufferCount);
|
|
542
|
|
- cli_dbgmsg("dmg_decode_mish: blockDataCount = %lu\n", mish_set->mish->blockDataCount);
|
|
|
538
|
+ cli_dbgmsg("dmg_decode_mish: startSector = %lu sectorCount = %lu "
|
|
|
539
|
+ "dataOffset = %lu stripeCount = %lu\n",
|
|
|
540
|
+ mish_set->mish->startSector, mish_set->mish->sectorCount,
|
|
|
541
|
+ mish_set->mish->dataOffset, mish_set->mish->blockDataCount);
|
|
543
|
542
|
|
|
544
|
543
|
/* decoded length should be mish block + blockDataCount * 40 */
|
|
545
|
544
|
if (decoded_len < (sizeof(struct dmg_mish_block)
|
|
...
|
...
|
@@ -1006,7 +1005,11 @@ static int dmg_handle_mish(cli_ctx *ctx, unsigned int mishblocknum, char *dir,
|
|
1006
|
1006
|
}
|
|
1007
|
1007
|
}
|
|
1008
|
1008
|
|
|
1009
|
|
- // ret = cli_magic_scandesc(ofd, ctx);
|
|
|
1009
|
+ /* If okay so far, scan rebuilt partition */
|
|
|
1010
|
+ if (ret == CL_CLEAN) {
|
|
|
1011
|
+ ; // ret = cli_magic_scandesc(ofd, ctx);
|
|
|
1012
|
+ }
|
|
|
1013
|
+
|
|
1010
|
1014
|
close(ofd);
|
|
1011
|
1015
|
if (!ctx->engine->keeptmp)
|
|
1012
|
1016
|
if (cli_unlink(outfile)) return CL_EUNLINK;
|