userlibandfileserver/fileserver/sfile/sf_raw.cpp
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
equal deleted inserted replaced
256:c1f20ce4abcf 257:3e88ff8f41d5
    15 // 
    15 // 
    16 //
    16 //
    17 
    17 
    18 #include "sf_std.h"
    18 #include "sf_std.h"
    19 #include "sf_file_cache.h"
    19 #include "sf_file_cache.h"
    20 
       
    21 #ifdef OST_TRACE_COMPILER_IN_USE
       
    22 #include "sf_rawTraces.h"
       
    23 #endif
       
    24 
    20 
    25 LOCAL_C CRawDiskCB* GetRawDiskFromHandle(TInt aHandle, CSessionFs* aSession)
    21 LOCAL_C CRawDiskCB* GetRawDiskFromHandle(TInt aHandle, CSessionFs* aSession)
    26 //
    22 //
    27 // Get the rawdisk control block from aHandle
    23 // Get the rawdisk control block from aHandle
    28 //
    24 //
   114 		return(KErrArgument);
   110 		return(KErrArgument);
   115 	TInt length=aRequest->Message().Int1();
   111 	TInt length=aRequest->Message().Int1();
   116 	const TAny* pDes=aRequest->Message().Ptr0();
   112 	const TAny* pDes=aRequest->Message().Ptr0();
   117 
   113 
   118 	TRACETHREADID(aRequest->Message());
   114 	TRACETHREADID(aRequest->Message());
   119 	OstTraceExt5(TRACE_FILESYSTEM, FSYS_ECMOUNTCBRAWREADL, "drive %d clientThreadId %x aPos %x:%x aLength %d", (TUint) aRequest->DriveNumber(), (TUint) threadId, (TUint) I64HIGH(pos), (TUint) I64LOW(pos), (TUint) length);
   115 	TRACE7(UTF::EBorder, UTraceModuleFileSys::ECMountCBRawReadL, EF32TraceUidFileSys, 
   120 
   116 		aRequest->DriveNumber(), I64LOW(pos), I64HIGH(pos), length, pDes, 0, I64LOW(threadId));
   121 	TRAP(r,rawDisk->Mount().RawReadL(pos,length,pDes,0,aRequest->Message()));
   117 	TRAP(r,rawDisk->Mount().RawReadL(pos,length,pDes,0,aRequest->Message()));
   122 
   118 	TRACERET1(UTF::EBorder, UTraceModuleFileSys::ECMountCBRawReadLRet, EF32TraceUidFileSys, r);
   123 	OstTrace1(TRACE_FILESYSTEM, FSYS_ECMOUNTCBRAWREADLRET, "r %d", r);
       
   124 
   119 
   125 	return(r);
   120 	return(r);
   126 	}
   121 	}
   127 
   122 
   128 TInt TFsRawDiskRead::Initialise(CFsRequest* aRequest)
   123 TInt TFsRawDiskRead::Initialise(CFsRequest* aRequest)
   162 		return(KErrArgument);
   157 		return(KErrArgument);
   163 	TInt length=aRequest->Message().Int1();
   158 	TInt length=aRequest->Message().Int1();
   164 	const TAny* pDes=aRequest->Message().Ptr0();
   159 	const TAny* pDes=aRequest->Message().Ptr0();
   165 
   160 
   166 	TRACETHREADID(aRequest->Message());
   161 	TRACETHREADID(aRequest->Message());
   167 	OstTraceExt5(TRACE_FILESYSTEM, FSYS_ECMOUNTCBRAWWRITEL, "drive %d clientThreadId %x aPos %x:%x aLength %d", (TUint) aRequest->DriveNumber(), (TUint) threadId, (TUint) I64HIGH(pos), (TUint) I64LOW(pos), (TUint) length);
   162 	TRACE7(UTF::EBorder, UTraceModuleFileSys::ECMountCBRawWriteL, EF32TraceUidFileSys, 
   168 
   163 		aRequest->DriveNumber(), I64LOW(pos), I64HIGH(pos), length, pDes, 0, I64LOW(threadId));
   169 	TRAP(r,rawDisk->Mount().RawWriteL(pos,length,pDes,0,aRequest->Message()));
   164 	TRAP(r,rawDisk->Mount().RawWriteL(pos,length,pDes,0,aRequest->Message()));
   170 
   165 	TRACERET1(UTF::EBorder, UTraceModuleFileSys::ECMountCBRawWriteLRet, EF32TraceUidFileSys, r);
   171 	OstTrace1(TRACE_FILESYSTEM, FSYS_ECMOUNTCBRAWWRITELRET, "r %d", r);
       
   172 
   166 
   173 	rawDisk->SetChanged();
   167 	rawDisk->SetChanged();
   174 	return(r);
   168 	return(r);
   175 	}
   169 	}
   176 
   170