+ if(!RETURN_ERROR(Status)) {\r
+ NumChar = BufferSize;\r
+ Stream->NumWritten += NumChar;\r
+ }\r
+ EFIerrno = Status; // Make error reason available to caller\r
+ return NumChar;\r
+}\r
+\r
+/** Read a wide character from the console input device.\r
+\r
+ Returns NUL or a translated input character.\r
+\r
+ @param[in] filp Pointer to file descriptor for this file.\r
+ @param[out] Buffer Buffer in which to place the read character.\r
+\r
+ @retval EFI_DEVICE_ERROR A hardware error has occurred.\r
+ @retval EFI_NOT_READY No data is available. Try again later.\r
+ @retval EFI_SUCCESS One wide character has been placed in Character\r
+ - 0x0000 NUL, ignore this\r
+ - Otherwise, should be a good wide character in Character\r
+**/\r
+static\r
+EFI_STATUS\r
+da_ConRawRead (\r
+ IN OUT struct __filedes *filp,\r
+ OUT wchar_t *Character\r
+)\r
+{\r
+ EFI_SIMPLE_TEXT_INPUT_PROTOCOL *Proto;\r
+ ConInstance *Stream;\r
+ cIIO *Self;\r
+ EFI_STATUS Status;\r
+ EFI_INPUT_KEY Key = {0,0};\r
+ wchar_t RetChar;\r
+\r
+ Self = (cIIO *)filp->devdata;\r
+ Stream = BASE_CR(filp->f_ops, ConInstance, Abstraction);\r
+ Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;\r
+\r
+ if(Stream->UnGetKey == CHAR_NULL) {\r
+ Status = Proto->ReadKeyStroke(Proto, &Key);\r