13VirtioFsSimpleFileWrite (
25 VirtioFsFile = VIRTIO_FS_FILE_FROM_SIMPLE_FILE (This);
26 VirtioFs = VirtioFsFile->OwnerFs;
28 if (VirtioFsFile->IsDirectory) {
29 return EFI_UNSUPPORTED;
32 if (!VirtioFsFile->IsOpenForWriting) {
33 return EFI_ACCESS_DENIED;
45 WriteSize = (UINT32)
MIN ((
UINTN)VirtioFs->MaxWrite, Left);
49 VirtioFsFile->FuseHandle,
50 VirtioFsFile->FilePosition + Transferred,
52 (UINT8 *)Buffer + Transferred
54 if (!EFI_ERROR (Status) && (WriteSize == 0)) {
58 Status = EFI_DEVICE_ERROR;
61 if (EFI_ERROR (Status)) {
65 Transferred += WriteSize;
69 *BufferSize = Transferred;
70 VirtioFsFile->FilePosition += Transferred;
EFI_STATUS VirtioFsFuseWrite(IN OUT VIRTIO_FS *VirtioFs, IN UINT64 NodeId, IN UINT64 FuseHandle, IN UINT64 Offset, IN OUT UINT32 *Size, IN VOID *Data)