summaryrefslogtreecommitdiffstats
path: root/StdLib/Include/sys/stat.h
diff options
context:
space:
mode:
authordaryl.mcdaniel <daryl.mcdaniel@intel.com>2014-09-11 21:42:26 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-11 21:42:26 +0000
commit0164fc8e76b6ca9023c893940ddb00ef0b6bee5a (patch)
treeed7da11bee1340f5e26c102ea15b7dea24b61a4f /StdLib/Include/sys/stat.h
parent9fc9f4d8b4c828e9164c48279422f69a214a3bcf (diff)
downloadedk2-0164fc8e76b6ca9023c893940ddb00ef0b6bee5a.tar.gz
edk2-0164fc8e76b6ca9023c893940ddb00ef0b6bee5a.tar.bz2
edk2-0164fc8e76b6ca9023c893940ddb00ef0b6bee5a.zip
StdLib: Fix some build problems and obscure bugs.
StdLib\ BsdSocketLib\ ns_print.c Use "%lu" format instead of "%Lu". A capital 'L' specifies (long double) in print formats. Add a cast from char to (unsigned int) to match its sprintf format. res_debug.c Use "%lu" format instead of "%Lu". A capital 'L' specifies (long double) in print formats. EfiSocketLib\ Socket.c Update copyright & correct formatting Include\ sys\ EfiCdefs.h Update copyright date Change type of LONGN and ULONGN to INTN and UINTN, respectively. errno.h Update copyright date Add enum member '__ESUCCESS = 0' fcntl.h Update copyright date Improve comment for O_EXCL stat.h Update copyright date Reorder the S_* flags Put the S_* predicate macros in the same order as their flag definitions Add a function header comment to the stat() function declaration. errno.h Update copyright date Define new ESUCCESS error code wchar.h Update copyright date Correct the description of the Nptr parameter to the wcstol, wcstoll, wcstoul, and wcstoull functions. x86\float.h Update copyright date Define 'long double' limits for non-Microsoft compilers LibC\ Containers\Queues\Fifo.c Rewrite to make more robust and secure (zeros out old data) StdLib\realpath.c Update copyright date Reformat descriptive comment for realpath() Add terminating CRLF Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16096 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/Include/sys/stat.h')
-rw-r--r--StdLib/Include/sys/stat.h39
1 files changed, 26 insertions, 13 deletions
diff --git a/StdLib/Include/sys/stat.h b/StdLib/Include/sys/stat.h
index 12520be83a..83fc58025a 100644
--- a/StdLib/Include/sys/stat.h
+++ b/StdLib/Include/sys/stat.h
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made
available under the terms and conditions of the BSD License that
accompanies this distribution. The full text of the license may be found at
@@ -119,21 +119,24 @@ struct stat {
#define S_EFISHIFT 20 // LS bit of the UEFI attributes
-#define S_IFMT _S_IFMT
-#define S_IFBLK _S_IFBLK
-#define S_IFREG _S_IFREG
-#define S_IFIFO _S_IFIFO
-#define S_IFCHR _S_IFCHR
-#define S_IFDIR _S_IFDIR
-#define S_IFSOCK _S_IFSOCK
+#define S_IFMT _S_IFMT
+#define S_IFIFO _S_IFIFO
+#define S_IFCHR _S_IFCHR
+#define S_IFDIR _S_IFDIR
+#define S_IFBLK _S_IFBLK
+#define S_IFREG _S_IFREG
+#define S_IFSOCK _S_IFSOCK
+#define S_ITTY _S_ITTY
+#define S_IWTTY _S_IWTTY
+#define S_ICONSOLE _S_ICONSOLE
-#define S_ISDIR(m) ((m & _S_IFMT) == _S_IFDIR) ///< directory
+#define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO) ///< fifo
#define S_ISCHR(m) ((m & _S_IFMT) == _S_IFCHR) ///< char special
-#define S_ISREG(m) ((m & _S_IFMT) == _S_IFREG) ///< regular file
+#define S_ISDIR(m) ((m & _S_IFMT) == _S_IFDIR) ///< directory
#define S_ISBLK(m) ((m & _S_IFMT) == _S_IFBLK) ///< block special
+#define S_ISREG(m) ((m & _S_IFMT) == _S_IFREG) ///< regular file
#define S_ISSOCK(m) ((m & _S_IFMT) == _S_IFSOCK) ///< socket
-#define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO) ///< fifo
/* The following three macros have been changed to reflect
access permissions that better reflect the UEFI FAT file system.
@@ -191,8 +194,18 @@ __BEGIN_DECLS
**/
int lstat (const char *, struct stat *);
- /**
- **/
+/** Obtains information about the file pointed to by path.
+
+ Opens the file pointed to by path, calls _EFI_FileInfo with the file's handle,
+ then closes the file.
+
+ @param[in] path Path to the file to obtain information about.
+ @param[out] statbuf Buffer in which the file status is put.
+
+ @retval 0 Successful Completion.
+ @retval -1 An error has occurred and errno has been set to
+ identify the error.
+**/
int stat (const char *, struct stat *);
/**