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