46 |
50 |
47 @capability DiskAdmin |
51 @capability DiskAdmin |
48 |
52 |
49 */ |
53 */ |
50 { |
54 { |
51 TRACEMULT3(UTF::EBorder, UTraceModuleEfsrv::EFormat1Open, MODULEUID, aFs.Handle(), aName, aFormatMode); |
55 OstTraceExt2(TRACE_BORDER, EFSRV_EFORMAT1OPEN, "sess %x aFormatMode %x", (TUint) aFs.Handle(), (TUint) aFormatMode); |
|
56 OstTraceData(TRACE_BORDER, EFSRV_EFORMAT1OPEN_EDRIVENAME, "DriveName %S", aName.Ptr(), aName.Length()<<1); |
52 |
57 |
53 TPtr8 c((TUint8*)&aCount,sizeof(TUint),sizeof(TUint)); |
58 TPtr8 c((TUint8*)&aCount,sizeof(TUint),sizeof(TUint)); |
54 TInt r = CreateSubSession(aFs,EFsFormatOpen,TIpcArgs(&aName,aFormatMode,&c)); |
59 TInt r = CreateSubSession(aFs,EFsFormatOpen,TIpcArgs(&aName,aFormatMode,&c)); |
55 |
60 |
56 TRACERET3(UTF::EBorder, UTraceModuleEfsrv::EFormatOpen1Return, MODULEUID, r, SubSessionHandle(), aCount); |
61 OstTraceExt3(TRACE_BORDER, EFSRV_EFORMATOPEN1RETURN, "r %d subs %x aCount %d", (TUint) r, (TUint) SubSessionHandle(), (TUint) aCount); |
|
62 |
57 return r; |
63 return r; |
58 } |
64 } |
59 |
65 |
60 |
66 |
61 EXPORT_C TInt RFormat::Open(RFs& aFs,const TDesC& aName,TUint aFormatMode,TInt& aCount,const TDesC8& aInfo) |
67 EXPORT_C TInt RFormat::Open(RFs& aFs,const TDesC& aName,TUint aFormatMode,TInt& aCount,const TDesC8& aInfo) |
84 @see TFormatMode |
90 @see TFormatMode |
85 |
91 |
86 @capability DiskAdmin |
92 @capability DiskAdmin |
87 */ |
93 */ |
88 { |
94 { |
89 TRACEMULT4(UTF::EBorder, UTraceModuleEfsrv::EFormat2Open, MODULEUID, aFs.Handle(), aName, aFormatMode, TUint(&aInfo)); |
95 OstTraceExt3(TRACE_BORDER, EFSRV_EFORMAT2OPEN, "sess %x aFormatMode %x aInfo %x", (TUint) aFs.Handle(), (TUint) aFormatMode, (TUint) TUint(&aInfo)); |
|
96 OstTraceData(TRACE_BORDER, EFSRV_EFORMAT2OPEN_EDRIVENAME, "DriveName %S", aName.Ptr(), aName.Length()<<1); |
90 |
97 |
91 TInt size = sizeof(TUint)+aInfo.Length(); |
98 TInt size = sizeof(TUint)+aInfo.Length(); |
92 TUint8* buf = new TUint8[size]; |
99 TUint8* buf = new TUint8[size]; |
93 |
100 |
94 TInt r; |
101 TInt r; |
104 r = CreateSubSession(aFs,EFsFormatOpen,TIpcArgs(&aName,aFormatMode,&c)); |
111 r = CreateSubSession(aFs,EFsFormatOpen,TIpcArgs(&aName,aFormatMode,&c)); |
105 aCount = *(TInt*)(&c[0]); |
112 aCount = *(TInt*)(&c[0]); |
106 delete[] buf; |
113 delete[] buf; |
107 } |
114 } |
108 |
115 |
109 TRACERET3(UTF::EBorder, UTraceModuleEfsrv::EFormatOpen2Return, MODULEUID, r, SubSessionHandle(), aCount); |
116 OstTraceExt3(TRACE_BORDER, EFSRV_EFORMATOPEN2RETURN, "r %d subs %x aCount %d", (TUint) r, (TUint) SubSessionHandle(), (TUint) aCount); |
|
117 |
110 return r; |
118 return r; |
111 } |
119 } |
112 |
120 |
113 |
121 |
114 |
122 |
120 |
128 |
121 Close() is guaranteed to return, and provides no indication whether |
129 Close() is guaranteed to return, and provides no indication whether |
122 it completed successfully or not. |
130 it completed successfully or not. |
123 */ |
131 */ |
124 { |
132 { |
125 TRACE2(UTF::EBorder, UTraceModuleEfsrv::EFormatClose, MODULEUID, Session().Handle(), SubSessionHandle()); |
133 OstTraceExt2(TRACE_BORDER, EFSRV_EFORMATCLOSE, "sess %x subs %x", (TUint) Session().Handle(), (TUint) SubSessionHandle()); |
126 |
134 |
127 CloseSubSession(EFsFormatSubClose); |
135 CloseSubSession(EFsFormatSubClose); |
128 |
136 |
129 TRACE0(UTF::EBorder, UTraceModuleEfsrv::EFormatCloseReturn, MODULEUID); |
137 OstTrace0(TRACE_BORDER, EFSRV_EFORMATCLOSERETURN, ""); |
130 } |
138 } |
131 |
139 |
132 |
140 |
133 |
141 |
134 EXPORT_C TInt RFormat::Next(TInt& aStep) |
142 EXPORT_C TInt RFormat::Next(TInt& aStep) |
150 |
158 |
151 @capability DiskAdmin |
159 @capability DiskAdmin |
152 |
160 |
153 */ |
161 */ |
154 { |
162 { |
155 TRACE2(UTF::EBorder, UTraceModuleEfsrv::EFormatNext1, MODULEUID, Session().Handle(), SubSessionHandle()); |
163 OstTraceExt2(TRACE_BORDER, EFSRV_EFORMATNEXT1, "sess %x subs %x", (TUint) Session().Handle(), (TUint) SubSessionHandle()); |
156 |
164 |
157 TPckg<TInt> e(aStep); |
165 TPckg<TInt> e(aStep); |
158 TInt r = SendReceive(EFsFormatNext,TIpcArgs(&e)); |
166 TInt r = SendReceive(EFsFormatNext,TIpcArgs(&e)); |
159 |
167 |
160 TRACERET2(UTF::EBorder, UTraceModuleEfsrv::EFormatNext1Return, MODULEUID, r, aStep); |
168 OstTraceExt2(TRACE_BORDER, EFSRV_EFORMATNEXT1RETURN, "r %d aStep %d", (TUint) r, (TUint) aStep); |
|
169 |
161 return r; |
170 return r; |
162 } |
171 } |
163 |
172 |
164 |
173 |
165 |
174 |
185 |
194 |
186 @capability DiskAdmin |
195 @capability DiskAdmin |
187 |
196 |
188 */ |
197 */ |
189 { |
198 { |
190 TRACE3(UTF::EBorder, UTraceModuleEfsrv::EFormatNext2, MODULEUID, Session().Handle(), SubSessionHandle(), &aStatus); |
199 OstTraceExt3(TRACE_BORDER, EFSRV_EFORMATNEXT2, "sess %x subs %x status %x", (TUint) Session().Handle(), (TUint) SubSessionHandle(), (TUint) &aStatus); |
191 |
200 |
192 SendReceive(EFsFormatNext,TIpcArgs(&aStep),aStatus); |
201 SendReceive(EFsFormatNext,TIpcArgs(&aStep),aStatus); |
193 |
202 |
194 TRACE0(UTF::EBorder, UTraceModuleEfsrv::EFormatNext2Return, MODULEUID); |
203 OstTrace0(TRACE_BORDER, EFSRV_EFORMATNEXT2RETURN, ""); |
195 } |
204 } |