MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / FSI_FP_Write

Function FSI_FP_Write

FSInject/FSInject.c:741–765  ·  view source on GitHub ↗

EFI_FILE_PROTOCOL.Write - Writes data to a file. */

Source from the content-addressed store, hash-verified

739
740/** EFI_FILE_PROTOCOL.Write - Writes data to a file. */
741EFI_STATUS
742EFIAPI
743FSI_FP_Write(
744 IN EFI_FILE_PROTOCOL *This,
745 IN OUT UINTN *BufferSize,
746 IN VOID *Buffer
747)
748{
749 EFI_STATUS Status = EFI_DEVICE_ERROR;
750 FSI_FILE_PROTOCOL *FSIThis;
751
752 DBG("FSI_FP %p.Write(%d, %p) ", This, *BufferSize, Buffer);
753
754 FSIThis = FSI_FROM_FILE_PROTOCOL(This);
755
756 if (FSIThis->TgtFP != NULL) {
757 // do it with target FP
758 Status = FSIThis->TgtFP->Write(FSIThis->TgtFP, BufferSize, Buffer);
759 } else if (FSIThis->SrcFP != NULL) {
760 // do it with source FP
761 Status = FSIThis->SrcFP->Write(FSIThis->SrcFP, BufferSize, Buffer);
762 }
763 DBG("= %r, *BufferSize=%d\n", Status, *BufferSize);
764 return Status;
765}
766
767/** EFI_FILE_PROTOCOL.SetPosition - Sets a file's current position. */
768EFI_STATUS

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected