kerneltest/e32test/mediaext/d_nfe.cpp
changeset 134 95847726fe57
parent 126 2b2a51c87b12
child 244 a77889bee936
equal deleted inserted replaced
133:2a0ada0a1bf8 134:95847726fe57
    19 #include <platform.h>
    19 #include <platform.h>
    20 #include <variantmediadef.h>
    20 #include <variantmediadef.h>
    21 #include "nfe.h"
    21 #include "nfe.h"
    22 
    22 
    23 #if defined(_DEBUG)
    23 #if defined(_DEBUG)
    24 	#define TRACE_ENABLED
    24 //	#define TRACE_ENABLED
    25 #else
    25 #else
    26 #endif
    26 #endif
    27 
    27 
    28 #if defined(TRACE_ENABLED)
    28 #if defined(TRACE_ENABLED)
    29 #define __KTRACE_PRINT(p) {p;}
    29 #define __KTRACE_PRINT(p) {p;}
   780 		case DLocalDrive::ERead:
   780 		case DLocalDrive::ERead:
   781 			r=HandleRead(aReq);
   781 			r=HandleRead(aReq);
   782 			break;
   782 			break;
   783 
   783 
   784 		case DLocalDrive::EWrite:
   784 		case DLocalDrive::EWrite:
   785 			WriteEncryptionStatusToBootSector(di, EFalse);	// a write to the drive clears the finalised state
       
   786 			r=HandleWrite(aReq);
   785 			r=HandleWrite(aReq);
   787 			break;
   786 			break;
   788 
   787 
   789 		case DLocalDrive::ECaps:
   788 		case DLocalDrive::ECaps:
   790 			r = HandleCaps(aReq);
   789 			r = HandleCaps(aReq);
  1469 TInt DMediaDriverNFE::WriteEncryptionStatusToBootSector(TNfeDriveInfo &aDi, TBool aFinalised)
  1468 TInt DMediaDriverNFE::WriteEncryptionStatusToBootSector(TNfeDriveInfo &aDi, TBool aFinalised)
  1470 	{
  1469 	{
  1471 	if (!aDi.IsUDADrive())
  1470 	if (!aDi.IsUDADrive())
  1472 		return KErrNone;
  1471 		return KErrNone;
  1473 
  1472 
  1474 	if (aDi.iDriveFinalised == aFinalised)
  1473 	aDi.iDriveFinalised = aFinalised;
  1475 		return KErrNone;
       
  1476 
  1474 
  1477 	TNfeDiskStatus status = aDi.Status();
  1475 	TNfeDiskStatus status = aDi.Status();
  1478 
  1476 
  1479 	TInt64 currentPos = aDi.iEntry.iPartitionBaseAddr;
  1477 	TInt64 currentPos = aDi.iEntry.iPartitionBaseAddr;
  1480 	TInt64 currentLen = KSectorSize;
  1478 	TInt64 currentLen = KSectorSize;