X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FTapeIo.h;h=222f5b5aed7f0e825cb27fcc28599a4dc4952917;hp=8f4b8692e5ec6a201477535cc8846b7a8ce2874b;hb=fed5f4475948fd09cb71ba4c9f3918af1c3a7ba6;hpb=ed66e1bc0d2be0a185fc47adab4930c3b7e2767f diff --git a/MdePkg/Include/Protocol/TapeIo.h b/MdePkg/Include/Protocol/TapeIo.h index 8f4b8692e5..222f5b5aed 100644 --- a/MdePkg/Include/Protocol/TapeIo.h +++ b/MdePkg/Include/Protocol/TapeIo.h @@ -2,14 +2,14 @@ EFI_TAPE_IO_PROTOCOL as defined in the UEFI 2.0. Provide services to control and access a tape device. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -23,7 +23,7 @@ typedef struct _EFI_TAPE_IO_PROTOCOL EFI_TAPE_IO_PROTOCOL; -typedef struct { +typedef struct _EFI_TAPE_HEADER { UINT64 Signature; UINT32 Revision; UINT32 BootDescSize; @@ -41,14 +41,14 @@ typedef struct { CHAR8 SystemName[256]; // UTF-8 CHAR8 TapeTitle[120]; // UTF-8 CHAR8 pad[468]; // pad to 1024 -} TAPE_HEADER; +} EFI_TAPE_HEADER; /** Reads from the tape. @param This A pointer to the EFI_TAPE_IO_PROTOCOL instance. - @param BufferSize Size of the buffer in bytes pointed to by Buffer. - @param Buffer Pointer to the buffer for data to be read into. + @param BufferSize The size of the buffer in bytes pointed to by Buffer. + @param Buffer The pointer to the buffer for data to be read into. @retval EFI_SUCCESS Data was successfully transferred from the media. @retval EFI_END_OF_FILE A filemark was encountered which limited the data @@ -63,7 +63,7 @@ typedef struct { The transfer was aborted since the current position of the media may be incorrect. @retval EFI_INVALID_PARAMETER A NULL Buffer was specified with a non-zero - BufferSize or the device is operating in fixed block + BufferSize, or the device is operating in fixed block size mode and the BufferSize was not a multiple of device's fixed block size @retval EFI_DEVICE_ERROR A device error occurred while attempting to transfer data @@ -83,7 +83,7 @@ EFI_STATUS @param This A pointer to the EFI_TAPE_IO_PROTOCOL instance. @param BufferSize Size of the buffer in bytes pointed to by Buffer. - @param Buffer Pointer to the buffer for data to be written from. + @param Buffer The pointer to the buffer for data to be written from. @retval EFI_SUCCESS Data was successfully transferred to the media. @retval EFI_END_OF_MEDIA The logical end of media has been reached. Data may have @@ -99,7 +99,7 @@ EFI_STATUS @retval EFI_WRITE_PROTECTED The media in the device is write-protected. The transfer was aborted since a write cannot be completed. @retval EFI_INVALID_PARAMETER A NULL Buffer was specified with a non-zero - BufferSize or the device is operating in fixed block + BufferSize, or the device is operating in fixed block size mode and the BufferSize was not a multiple of device's fixed block size @retval EFI_DEVICE_ERROR A device error occurred while attempting to transfer data @@ -142,6 +142,9 @@ EFI_STATUS @param This A pointer to the EFI_TAPE_IO_PROTOCOL instance. @param Direction Direction and number of data blocks or filemarks to space over on media. @param Type Type of mark to space over on media. + The following Type marks are mandatory: + BLOCK type : 0 + FILEMARK type : 1 @retval EFI_SUCCESS The media was successfully repositioned. @retval EFI_END_OF_MEDIA Beginning or end of media was reached before the @@ -161,8 +164,8 @@ typedef EFI_STATUS (EFIAPI *EFI_TAPE_SPACE)( IN EFI_TAPE_IO_PROTOCOL *This, - INTN Direction, - UINTN Type + IN INTN Direction, + IN UINTN Type ); @@ -214,31 +217,12 @@ EFI_STATUS IN BOOLEAN ExtendedVerification ); -/** - @par Protocol Description: - The EFI_TAPE_IO_PROTOCOL provides basic sequential operations for tape devices. - These include read, write, rewind, space, write filemarks and reset functions. - Per this specification, a boot application uses the services of this protocol - to load the bootloader image from tape. - - @param TapeRead - Read a block of data from the tape. - - @param TapeWrite - Write a block of data to the tape. - - @param TapeRewind - Rewind the tape. - - @param TapeSpace - Position the tape. - - @param TapeWriteFM - Write filemarks to the tape. - - @param TapeReset - Reset the tape device or its parent bus. -**/ +/// +/// The EFI_TAPE_IO_PROTOCOL provides basic sequential operations for tape devices. +/// These include read, write, rewind, space, write filemarks and reset functions. +/// Per this specification, a boot application uses the services of this protocol +/// to load the bootloader image from tape. +/// struct _EFI_TAPE_IO_PROTOCOL { EFI_TAPE_READ TapeRead; EFI_TAPE_WRITE TapeWrite;