Lines Matching refs:FHand
57 SIMPLE_READ_HANDLE *FHand;
66 FHand = NULL;
73 FHand = AllocateZeroPool (sizeof(SIMPLE_READ_HANDLE));
74 if (!FHand) {
79 *SimpleReadHandle = (SIMPLE_READ_FILE) FHand;
80 FHand->Signature = SIMPLE_READ_SIGNATURE;
87 FHand->Source = SourceBuffer;
88 FHand->SourceSize = SourceSize;
163 // If success, return the FHand
168 FHand->FileHandle = FileHandle;
229 FHand->FreeBuffer = TRUE;
230 FHand->Source = SourceBuffer;
231 FHand->SourceSize = SourceSize;
246 // If success, return FHand
267 if (FHand) {
268 if (FHand->FreeBuffer) {
269 FreePool (FHand->Source);
272 FreePool (FHand);
288 SIMPLE_READ_HANDLE *FHand;
291 FHand = UserHandle;
292 ASSERT (FHand->Signature == SIMPLE_READ_SIGNATURE);
293 if (FHand->Source) {
300 if (EndPos > FHand->SourceSize) {
301 *ReadSize = FHand->SourceSize - Offset;
302 if (Offset >= FHand->SourceSize) {
307 CopyMem (Buffer, (CHAR8 *) FHand->Source + Offset, *ReadSize);
316 Status = uefi_call_wrapper(FHand->FileHandle->SetPosition, 2, FHand->FileHandle, Offset);
319 Status = uefi_call_wrapper(FHand->FileHandle->Read, 3, FHand->FileHandle, ReadSize, Buffer);
332 SIMPLE_READ_HANDLE *FHand;
334 FHand = UserHandle;
335 ASSERT (FHand->Signature == SIMPLE_READ_SIGNATURE);
341 if (FHand->FileHandle) {
342 uefi_call_wrapper(FHand->FileHandle->Close, 1, FHand->FileHandle);
349 if (FHand->FreeBuffer) {
350 FreePool (FHand->Source);
357 FreePool (FHand);