diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-03 00:52:37 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-03 00:52:37 +0000 |
commit | d09ed37fb138cb4ea13235e3046e8cddbfda5c12 (patch) | |
tree | 51642b59f48b1b438c083781f90c550c8baba34f /StdLib/Include | |
parent | feb1422b3a557a844f1c8c9436fe1d7e0d87c364 (diff) | |
download | edk2-platforms-d09ed37fb138cb4ea13235e3046e8cddbfda5c12.tar.xz |
StdLib: Fix some corrupted comments and inconsistent indentation.
Signed-off-by: darylm503
Reviewed-by: geekboy15a
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12655 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/Include')
-rw-r--r-- | StdLib/Include/errno.h | 76 | ||||
-rw-r--r-- | StdLib/Include/sys/ioccom.h | 7 |
2 files changed, 40 insertions, 43 deletions
diff --git a/StdLib/Include/errno.h b/StdLib/Include/errno.h index 4989d4d150..db2eb3c71c 100644 --- a/StdLib/Include/errno.h +++ b/StdLib/Include/errno.h @@ -2,10 +2,6 @@ The header <errno.h> defines several macros, all relating to the reporting of
error conditions.
- The macros expand to integral constant expressions
- with distinct nonzero values, suitable for use in #if preprocessing
- directives.
-
The ISO/IEC 9899 specification requires that these be macros.
The macros expand to integral constant expressions
@@ -51,44 +47,44 @@ extern RETURN_STATUS EFIerrno; #define ERESTART -1 /* restart syscall */
-#define EMINERRORVAL __EMINERRORVAL /* The lowest valid error value */
-
-#define EPERM __EPERM /* Operation not permitted */
-#define ENOENT __ENOENT /* No such file or directory */
-#define ESRCH __ESRCH /* No such process */
-#define EINTR __EINTR /* Interrupted system call */
-#define EIO __EIO /* Input/output error */
-#define ENXIO __ENXIO /* Device not configured */
-#define E2BIG __E2BIG /* Argument list too long */
-#define ENOEXEC __ENOEXEC /* Exec format error */
-#define EBADF __EBADF /* Bad file descriptor */
-#define ECHILD __ECHILD /* No child processes */
-#define EDEADLK __EDEADLK /* Resource deadlock avoided */
-#define ENOMEM __ENOMEM /* Cannot allocate memory */
-#define EACCES __EACCES /* Permission denied */
-#define EFAULT __EFAULT /* Bad address */
-#define ENOTBLK __ENOTBLK /* Block device required */
-#define EBUSY __EBUSY /* Device busy */
-#define EEXIST __EEXIST /* File exists */
-#define EXDEV __EXDEV /* Cross-device link */
-#define ENODEV __ENODEV /* Operation not supported by device */
-#define ENOTDIR __ENOTDIR /* Not a directory */
-#define EISDIR __EISDIR /* Is a directory */
-#define EINVAL __EINVAL /* Invalid argument */
-#define ENFILE __ENFILE /* Too many open files in system */
-#define EMFILE __EMFILE /* Too many open file descriptors */
-#define ENOTTY __ENOTTY /* Inappropriate ioctl for device */
-#define ETXTBSY __ETXTBSY /* Text file busy */
-#define EFBIG __EFBIG /* File too large */
-#define ENOSPC __ENOSPC /* No space left on device */
-#define ESPIPE __ESPIPE /* Illegal seek */
-#define EROFS __EROFS /* Read-only filesystem */
-#define EMLINK __EMLINK /* Too many links */
-#define EPIPE __EPIPE /* Broken pipe */
+#define EMINERRORVAL __EMINERRORVAL /* 1 The lowest valid error value */
+
+#define EPERM __EPERM /* 1 Operation not permitted */
+#define ENOENT __ENOENT /* 2 No such file or directory */
+#define ESRCH __ESRCH /* 3 No such process */
+#define EINTR __EINTR /* 4 Interrupted system call */
+#define EIO __EIO /* 5 Input/output error */
+#define ENXIO __ENXIO /* 6 Device not configured */
+#define E2BIG __E2BIG /* 7 Argument list too long */
+#define ENOEXEC __ENOEXEC /* 8 Exec format error */
+#define EBADF __EBADF /* 9 Bad file descriptor */
+#define ECHILD __ECHILD /* 10 No child processes */
+#define EDEADLK __EDEADLK /* 11 Resource deadlock avoided */
+#define ENOMEM __ENOMEM /* 12 Cannot allocate memory */
+#define EACCES __EACCES /* 13 Permission denied */
+#define EFAULT __EFAULT /* 14 Bad address */
+#define ENOTBLK __ENOTBLK /* 15 Block device required */
+#define EBUSY __EBUSY /* 16 Device busy */
+#define EEXIST __EEXIST /* 17 File exists */
+#define EXDEV __EXDEV /* 18 Cross-device link */
+#define ENODEV __ENODEV /* 19 Operation not supported by device */
+#define ENOTDIR __ENOTDIR /* 20 Not a directory */
+#define EISDIR __EISDIR /* 21 Is a directory */
+#define EINVAL __EINVAL /* 22 Invalid argument */
+#define ENFILE __ENFILE /* 23 Too many open files in system */
+#define EMFILE __EMFILE /* 24 Too many open file descriptors */
+#define ENOTTY __ENOTTY /* 25 Inappropriate ioctl for device */
+#define ETXTBSY __ETXTBSY /* 26 Text file busy */
+#define EFBIG __EFBIG /* 27 File too large */
+#define ENOSPC __ENOSPC /* 28 No space left on device */
+#define ESPIPE __ESPIPE /* 29 Illegal seek */
+#define EROFS __EROFS /* 30 Read-only filesystem */
+#define EMLINK __EMLINK /* 31 Too many links */
+#define EPIPE __EPIPE /* 32 Broken pipe */
/* math software -- these are the only two values required by the C Standard */
-#define EDOM __EDOM /* 3umerical argument out of domain */
-#define ERANGE __ERANGE /* 3esult too large */
+#define EDOM __EDOM /* 33 Numerical argument out of domain */
+#define ERANGE __ERANGE /* 34 Result too large */
/* non-blocking and interrupt i/o */
#define EAGAIN __EAGAIN /* 35 Resource temporarily unavailable */
diff --git a/StdLib/Include/sys/ioccom.h b/StdLib/Include/sys/ioccom.h index 210c9180d7..852a082b28 100644 --- a/StdLib/Include/sys/ioccom.h +++ b/StdLib/Include/sys/ioccom.h @@ -30,7 +30,6 @@ *
* @(#)ioccom.h 8.3 (Berkeley) 1/9/95
*/
-
#ifndef _SYS_IOCCOM_H_
#define _SYS_IOCCOM_H_
@@ -40,6 +39,7 @@ * upper word are used to encode the in/out status of the parameter.
*/
#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
+
#define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK)
#define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16))
#define IOCGROUP(x) (((x) >> 8) & 0xff)
@@ -56,11 +56,12 @@ /* mask for IN/OUT/VOID */
#define IOC_DIRMASK (unsigned long)0xe0000000
-#define _IOC(inout,group,num,len) \
- (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
+#define _IOC(inout,group,num,len) (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
+
#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0)
#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t))
#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t))
+
/* this should be _IORW, but stdio got there first */
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
|