-\r
- if (Status == EFI_ACCESS_DENIED) {\r
- AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n");\r
- } else if (Status == EFI_BUFFER_TOO_SMALL && Buffer != NULL) {\r
- AsciiPrint ("\n Error: Buffer size is smaller than the requested file.\n");\r
- } else if (Status == EFI_OUT_OF_RESOURCES) {\r
- AsciiPrint ("\n Error: Could not allocate I/O buffers.\n");\r
- } else if (Status == EFI_DEVICE_ERROR) {\r
- AsciiPrint ("\n Error: Network device error.\n");\r
- } else if (Status == EFI_TIMEOUT) {\r
- AsciiPrint ("\n Error: Server response timeout.\n");\r
- } else if (Status == EFI_ABORTED) {\r
- AsciiPrint ("\n Error: Remote boot cancelled.\n");\r
- } else if (Status != EFI_BUFFER_TOO_SMALL) {\r
- AsciiPrint ("\n Error: Unexpected network error.\n");\r
+ \r
+ if (EFI_ERROR (Status)) {\r
+ if (Status == EFI_ACCESS_DENIED) {\r
+ AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n");\r
+ } else if (Status == EFI_BUFFER_TOO_SMALL && Buffer != NULL) {\r
+ AsciiPrint ("\n Error: Buffer size is smaller than the requested file.\n");\r
+ } else if (Status == EFI_OUT_OF_RESOURCES) {\r
+ AsciiPrint ("\n Error: Could not allocate I/O buffers.\n");\r
+ } else if (Status == EFI_DEVICE_ERROR) {\r
+ AsciiPrint ("\n Error: Network device error.\n");\r
+ } else if (Status == EFI_TIMEOUT) {\r
+ AsciiPrint ("\n Error: Server response timeout.\n");\r
+ } else if (Status == EFI_ABORTED) {\r
+ AsciiPrint ("\n Error: Remote boot cancelled.\n");\r
+ } else if (Status != EFI_BUFFER_TOO_SMALL) {\r
+ AsciiPrint ("\n Error: Unexpected network error.\n");\r
+ }\r