mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Add mkfifo()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@773 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+14
-13
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sys/stat.h
|
||||
/****************************************************************************
|
||||
* include/sys/stat.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,21 +31,21 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __SYS_STAT_H
|
||||
#define __SYS_STAT_H
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* mode_t bit settings (most of these do not apply to Nuttx).
|
||||
* This assumes that the full size of a mode_t is 16-bits.
|
||||
@@ -91,9 +91,9 @@
|
||||
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Type Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* This is the simplified struct stat as returned by fstat().
|
||||
* This structure provides information about a specific file
|
||||
@@ -111,9 +111,9 @@ struct stat
|
||||
time_t st_ctime; /* Time of last status change */
|
||||
};
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
@@ -124,6 +124,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
EXTERN int mkdir(FAR const char *pathname, mode_t mode);
|
||||
EXTERN int mkfifo(FAR const char *pathname, mode_t mode);
|
||||
EXTERN int stat(const char *path, FAR struct stat *buf);
|
||||
EXTERN int fstat(int fd, FAR struct stat *buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user