Fix failure report out of the RCM for MacOS

This commit is contained in:
Dmitry Isaenko 2020-02-20 17:53:22 +03:00
parent a82a993812
commit d0131f26b4

View file

@ -269,15 +269,8 @@ public class RcmTask extends Task<Boolean> {
* MacOS version of RcmSmash class * MacOS version of RcmSmash class
* */ * */
boolean smashMacOS(){ boolean smashMacOS(){
int result; ByteBuffer writeBuffer = ByteBuffer.allocateDirect(28672);
LibUsb.controlTransfer(handler, (byte) 0x82, LibUsb.REQUEST_GET_STATUS, (short) 0, (short) 0, writeBuffer, 1000); // Result doesn't matter.
ByteBuffer writeBuffer = ByteBuffer.allocateDirect(28672); //writeBuffer.order() equals BIG_ENDIAN; 28672
result = LibUsb.controlTransfer(handler, (byte) 0x82, LibUsb.REQUEST_GET_STATUS, (short) 0, (short) 0, writeBuffer, 1000);
if (result < 0){
logPrinter.print("Failed to smash the stack ("+UsbErrorCodes.getErrCode(result)+")"+
"\n\n Execution stopped and failed.", EMsgType.FAIL);
return true;
}
logPrinter.print(".:: Payload complete ::.", EMsgType.PASS); logPrinter.print(".:: Payload complete ::.", EMsgType.PASS);
return false; return false;
} }