]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/sys/stat.h
StdLib: Fix some build problems and obscure bugs.
[mirror_edk2.git] / StdLib / Include / sys / stat.h
index 12520be83ab842c70ec2d9220a5ab9e40a02924b..83fc58025aea77a2d46ba3d1db8949556b41e2fd 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-    Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made\r
     available under  the terms and conditions of the BSD License that\r
     accompanies this distribution. The full text of the license may be found at\r
@@ -119,21 +119,24 @@ struct stat {
 \r
 #define S_EFISHIFT    20            // LS bit of the UEFI attributes\r
 \r
-#define S_IFMT   _S_IFMT\r
-#define S_IFBLK  _S_IFBLK\r
-#define S_IFREG  _S_IFREG\r
-#define S_IFIFO  _S_IFIFO\r
-#define S_IFCHR  _S_IFCHR\r
-#define S_IFDIR  _S_IFDIR\r
-#define S_IFSOCK _S_IFSOCK\r
+#define S_IFMT      _S_IFMT\r
+#define S_IFIFO     _S_IFIFO\r
+#define S_IFCHR     _S_IFCHR\r
+#define S_IFDIR     _S_IFDIR\r
+#define S_IFBLK     _S_IFBLK\r
+#define S_IFREG     _S_IFREG\r
+#define S_IFSOCK    _S_IFSOCK\r
+#define S_ITTY      _S_ITTY\r
+#define S_IWTTY     _S_IWTTY\r
+#define S_ICONSOLE  _S_ICONSOLE\r
 \r
-#define S_ISDIR(m)  ((m & _S_IFMT) == _S_IFDIR)   ///< directory\r
+#define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO)   ///< fifo\r
 #define S_ISCHR(m)  ((m & _S_IFMT) == _S_IFCHR)   ///< char special\r
-#define S_ISREG(m)  ((m & _S_IFMT) == _S_IFREG)   ///< regular file\r
+#define S_ISDIR(m)  ((m & _S_IFMT) == _S_IFDIR)   ///< directory\r
 #define S_ISBLK(m)  ((m & _S_IFMT) == _S_IFBLK)   ///< block special\r
+#define S_ISREG(m)  ((m & _S_IFMT) == _S_IFREG)   ///< regular file\r
 #define S_ISSOCK(m) ((m & _S_IFMT) == _S_IFSOCK)  ///< socket\r
 \r
-#define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO)   ///< fifo\r
 \r
 /*  The following three macros have been changed to reflect\r
     access permissions that better reflect the UEFI FAT file system.\r
@@ -191,8 +194,18 @@ __BEGIN_DECLS
   **/\r
   int     lstat (const char *, struct stat *);\r
 \r
-  /**\r
-  **/\r
+/** Obtains information about the file pointed to by path.\r
+\r
+    Opens the file pointed to by path, calls _EFI_FileInfo with the file's handle,\r
+    then closes the file.\r
+\r
+    @param[in]    path      Path to the file to obtain information about.\r
+    @param[out]   statbuf   Buffer in which the file status is put.\r
+\r
+    @retval    0  Successful Completion.\r
+    @retval   -1  An error has occurred and errno has been set to\r
+                  identify the error.\r
+**/\r
   int     stat  (const char *, struct stat *);\r
 \r
   /**\r