diff options
Diffstat (limited to 'StdLib/LibC')
-rw-r--r-- | StdLib/LibC/Uefi/Devices/UefiShell/daShell.c | 4 | ||||
-rw-r--r-- | StdLib/LibC/Uefi/SysCalls.c | 2 | ||||
-rw-r--r-- | StdLib/LibC/Uefi/compat.c | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c b/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c index d0abb8dd5b..de14ef31c5 100644 --- a/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c +++ b/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c @@ -304,14 +304,14 @@ da_ShellStat( }
else {
Status = RETURN_DEVICE_ERROR;
+ errno = EIO;
}
- errno = EFI2errno(Status);
EFIerrno = Status;
if(FileInfo != NULL) {
FreePool(FileInfo); // Release the buffer allocated by the GetInfo function
}
- return errno? -1 : 0;
+ return (Status == RETURN_SUCCESS)? 0 : -1;
}
static
diff --git a/StdLib/LibC/Uefi/SysCalls.c b/StdLib/LibC/Uefi/SysCalls.c index d52249b58b..b5079e2c3a 100644 --- a/StdLib/LibC/Uefi/SysCalls.c +++ b/StdLib/LibC/Uefi/SysCalls.c @@ -923,7 +923,7 @@ fstat (int fd, struct stat *statbuf) identify the error.
**/
int
-stat (const char *path, void *statbuf)
+stat (const char *path, struct stat *statbuf)
{
int fd;
int retval = -1;
diff --git a/StdLib/LibC/Uefi/compat.c b/StdLib/LibC/Uefi/compat.c index 7f250d15ff..8ce4783a6a 100644 --- a/StdLib/LibC/Uefi/compat.c +++ b/StdLib/LibC/Uefi/compat.c @@ -94,6 +94,7 @@ #include <LibConfig.h>
#include <string.h>
#include <fcntl.h>
+#include <sys/syslimits.h>
#ifndef HAVE_GETOPT
char *optarg;
@@ -138,11 +139,7 @@ getopt(int argc, char **argv, char *args) }
#endif
-#ifdef WIN32
#define ISPATHSEPARATOR(x) ((x == '/') || (x == '\\'))
-#else
-#define ISPATHSEPARATOR(x) (x == '/')
-#endif
#ifndef HAVE_BASENAME
#ifndef PATH_MAX
|