Usermode/libc - Fixed some slight errno issues
authorJohn Hodge <[email protected]>
Mon, 15 Jul 2013 02:15:14 +0000 (10:15 +0800)
committerJohn Hodge <[email protected]>
Mon, 15 Jul 2013 02:15:14 +0000 (10:15 +0800)
Usermode/Libraries/libc.so_src/errno.c
Usermode/Libraries/libc.so_src/include_exp/errno.enum.h
Usermode/Libraries/libc.so_src/include_exp/errno.h

index 9877328..f1c3c4d 100644 (file)
@@ -18,6 +18,9 @@ EXPORT const char *strerror(int errnum)
 {
        switch(errnum)
        {
+       case EOK:       return "Success";
+       case EISDIR:    return "Is a directory";
+       case ENOTDIR:   return "Not a directory";
        case ENOSYS:    return "Invalid instruction/syscall";
        case ENOENT:    return "No such file or directory";
        case EINVAL:    return "Bad arguments";
index de9bd7b..831ab65 100644 (file)
@@ -15,6 +15,7 @@ enum {
        EEXIST, // Already exists
        ENFILE, // Too many open files
        ENOTDIR,        // Not a directory
+       EISDIR, // Is a directory
        EIO,    // IO Error
        EINTR,  // Operation interrupted (signal)
        EWOULDBLOCK,    // Operation would have blocked
index 2fc26a3..a808379 100644 (file)
@@ -5,15 +5,15 @@
  * errno.h
  * - Error values and related functions
  */
-#ifndef _ERRNO_H_
-#define _ERRNO_H_
+#ifndef _LIBC_ERRNO_H_
+#define _LIBC_ERRNO_H_
 
 // TODO: Fully implement errno.h, make sure it matches the kernel one
 
 extern int     *libc_geterrno(void);
 #define        errno   (*libc_geterrno())
 
-extern const char      *strerr(int errnum);
+extern const char      *strerror(int errnum);
 
 #include "errno.enum.h"
 

UCC git Repository :: git.ucc.asn.au