EFI_STATUS EFIAPI FvbProtocolWrite ( IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Offset, IN OUT UINTN *NumBytes, IN UINT8 *Buffer ) /*++ Routine Description: Writes data beginning at Lba:Offset from FV. The write terminates either when *NumBytes of data have been written, or when a block boundary is reached. *NumBytes is updated to reflect the actual number of bytes written. The write opertion does not include erase. This routine will attempt to write only the specified bytes. If the writes do not stick, it will return an error. Arguments: This - Calling context Lba - Block in which to begin write Offset - Offset in the block at which to begin write NumBytes - On input, indicates the requested write size. On output, indicates the actual number of bytes written Buffer - Buffer containing source data for the write. Returns: EFI_SUCCESS - The firmware volume was written successfully EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output, NumBytes contains the total number of bytes actually written EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be written EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL **/ { EFI_FW_VOL_BLOCK_DEVICE *FvbDevice; FvbDevice = FVB_DEVICE_FROM_THIS (This); return FvbWriteBlock (FvbDevice->Instance, Lba, Offset, NumBytes, Buffer, mFvbModuleGlobal, EfiGoneVirtual ()); }
/** Writes data beginning at Lba:Offset from FV. The write terminates either when *NumBytes of data have been written, or when a block boundary is reached. *NumBytes is updated to reflect the actual number of bytes written. The write opertion does not include erase. This routine will attempt to write only the specified bytes. If the writes do not stick, it will return an error. @param[in] This Calling context @param[in] Lba Block in which to begin write @param[in] Offset Offset in the block at which to begin write @param[in, out] NumBytes On input, indicates the requested write size. On output, indicates the actual number of bytes written @param[in] Buffer Buffer containing source data for the write. @retval EFI_SUCCESS The firmware volume was written successfully @retval EFI_BAD_BUFFER_SIZE Write attempted across a LBA boundary. On output, NumBytes contains the total number of bytes actually written @retval EFI_ACCESS_DENIED The firmware volume is in the WriteDisabled state @retval EFI_DEVICE_ERROR The block device is not functioning correctly and could not be written @retval EFI_INVALID_PARAMETER NumBytes or Buffer are NULL **/ EFI_STATUS EFIAPI FvbProtocolWrite ( IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Offset, IN OUT UINTN *NumBytes, IN UINT8 *Buffer ) { EFI_STATUS Status; EFI_FW_VOL_BLOCK_DEVICE *FvbDevice; FvbDevice = FVB_DEVICE_FROM_THIS (This); Status = FvbWriteBlock (FvbDevice->Instance, Lba, Offset, NumBytes, Buffer); return Status; }