]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | Copyright (c) 2006, Intel Corporation \r | |
3 | All rights reserved. This program and the accompanying materials \r | |
4 | are licensed and made available under the terms and conditions of the BSD License \r | |
5 | which accompanies this distribution. The full text of the license may be found at \r | |
6 | http://opensource.org/licenses/bsd-license.php \r | |
7 | \r | |
8 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
9 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
10 | \r | |
11 | Module Name:\r | |
12 | \r | |
13 | TapeIo.h\r | |
14 | \r | |
15 | Abstract: \r | |
16 | EFI_TAPE_IO_PROTOCOL as defined in the UEFI 2.0.\r | |
17 | Provide services to control and access a tape device.\r | |
18 | \r | |
19 | Revision History\r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | #ifndef __EFI_TAPE_IO_PROTOCOL_H__\r | |
24 | #define __EFI_TAPE_IO_PROTOCOL_H__\r | |
25 | \r | |
26 | #define EFI_TAPE_IO_PROTOCOL_GUID \\r | |
27 | { \\r | |
28 | 0x1e93e633, 0xd65a, 0x459e, {0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } \\r | |
29 | }\r | |
30 | \r | |
31 | typedef struct _EFI_TAPE_IO_PROTOCOL EFI_TAPE_IO_PROTOCOL;\r | |
32 | \r | |
33 | typedef struct {\r | |
34 | UINT64 Signature;\r | |
35 | UINT32 Revision;\r | |
36 | UINT32 BootDescSize;\r | |
37 | UINT32 BootDescCRC;\r | |
38 | EFI_GUID TapeGUID;\r | |
39 | EFI_GUID TapeType;\r | |
40 | EFI_GUID TapeUnique;\r | |
41 | UINT32 BLLocation;\r | |
42 | UINT32 BLBlocksize;\r | |
43 | UINT32 BLFilesize;\r | |
44 | CHAR8 OSVersion[40];\r | |
45 | CHAR8 AppVersion[40];\r | |
46 | CHAR8 CreationDate[10];\r | |
47 | CHAR8 CreationTime[10];\r | |
48 | CHAR8 SystemName[256]; // UTF-8\r | |
49 | CHAR8 TapeTitle[120]; // UTF-8\r | |
50 | CHAR8 pad[468]; // pad to 1024\r | |
51 | } TAPE_HEADER;\r | |
52 | \r | |
53 | typedef \r | |
54 | EFI_STATUS\r | |
55 | (EFIAPI *EFI_TAPE_READ) (\r | |
56 | IN EFI_TAPE_IO_PROTOCOL *This,\r | |
57 | IN OUT UINTN *BufferSize,\r | |
58 | OUT VOID *Buffer\r | |
59 | )\r | |
60 | /*++\r | |
61 | \r | |
62 | Routine Description:\r | |
63 | Reads from the tape.\r | |
64 | \r | |
65 | Arguments:\r | |
66 | This - A pointer to the EFI_TAPE_IO_PROTOCOL instance.\r | |
67 | BufferSize - Size of the buffer in bytes pointed to by Buffer.\r | |
68 | Buffer - Pointer to the buffer for data to be read into.\r | |
69 | \r | |
70 | Returns:\r | |
71 | EFI_SUCCESS - Data was successfully transferred from the media.\r | |
72 | EFI_END_OF_FILE - A filemark was encountered which limited the data\r | |
73 | transferred by the read operation or the head is positioned\r | |
74 | just after a filemark.\r | |
75 | EFI_NO_MEDIA - No media is loaded in the device.\r | |
76 | EFI_NOT_READY - The transfer failed since the device was not ready (e.g. not\r | |
77 | online). The transfer may be retried at a later time.\r | |
78 | EFI_UNSUPPORTED - The device does not support this type of transfer.\r | |
79 | EFI_TIMEOUT - The transfer failed to complete within the timeout specified.\r | |
80 | EFI_MEDIA_CHANGED - The media in the device was changed since the last access.\r | |
81 | The transfer was aborted since the current position of the\r | |
82 | media may be incorrect.\r | |
83 | EFI_INVALID_PARAMETER - A NULL Buffer was specified with a non-zero\r | |
84 | BufferSize or the device is operating in fixed block\r | |
85 | size mode and the BufferSize was not a multiple of\r | |
86 |