mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 03:03:37 +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:
@@ -374,3 +374,4 @@
|
||||
* Improved solution to POSIX timer lifetime controls bug fixed in 0.3.11.
|
||||
* Add test for recursive mutexes
|
||||
* Correct bug in recursive mutex logic
|
||||
* Add mkfifo()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||
<p>Last Updated: June 3, 2008</p>
|
||||
<p>Last Updated: July 20, 2008</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1023,6 +1023,7 @@ nuttx-0.3.12 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Improved solution to POSIX timer lifetime controls bug fixed in 0.3.11.
|
||||
* Add test for recursive mutexes
|
||||
* Correct bug in recursive mutex logic
|
||||
* Add mkfifo()
|
||||
|
||||
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ User's Manual
|
||||
<p>
|
||||
Gregory Nutt
|
||||
<p>
|
||||
<small>Last Update: May 31, 2008</small>
|
||||
<small>Last Update: July 20, 2008</small>
|
||||
</center>
|
||||
|
||||
<h1>1.0 <A NAME="Introduction">Introduction</a></h1>
|
||||
@@ -5964,6 +5964,7 @@ interface of the same name.
|
||||
int fstat(int fd, FAR struct stat *buf); /* Prototyped but not implemented */
|
||||
char *getcwd(FAR char *buf, size_t size); /* Prototyped but not implemented */
|
||||
int mkdir(const char *path, mode_t mode);
|
||||
int mkfifo(const char *path, mode_t mode);
|
||||
int rmdir(const char *path);
|
||||
int stat(const char *path, FAR struct stat *buf);
|
||||
int statfs(const char *path, FAR struct statfs *buf); /* Prototyped but not implemented */
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
|
||||
CSRCS =
|
||||
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
||||
CSRCS += dev_null.c dev_zero.c serial.c lowconsole.c can.c
|
||||
CSRCS += dev_null.c dev_zero.c fifo.c serial.c lowconsole.c can.c
|
||||
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
||||
CSRCS += ramdisk.c
|
||||
endif
|
||||
|
||||
+569
File diff suppressed because it is too large
Load Diff
+10
-3
@@ -56,8 +56,8 @@
|
||||
* refer to the interpretation under FAT32.
|
||||
*/
|
||||
|
||||
#define BS_JUMP 0 /* 3@0: Jump instruction to boot code (ignored) */
|
||||
#define BS_OEMNAME 3 /* 8@3: Usually "MSWIN4.1" */
|
||||
#define BS_JUMP 0 /* 3@0: Jump instruction to boot code (ignored) */
|
||||
#define BS_OEMNAME 3 /* 8@3: Usually "MSWIN4.1" */
|
||||
#define BS_BYTESPERSEC 11 /* 2@11: Bytes per sector: 512, 1024, 2048, 4096 */
|
||||
#define BS_SECPERCLUS 13 /* 1@13: Sectors per allocation unit: 2**n, n=0..7 */
|
||||
#define BS_RESVDSECCOUNT 14 /* 2@14: Reserved sector count: Usually 32 */
|
||||
@@ -74,12 +74,15 @@
|
||||
/* The following fields are only valid for FAT12/16 */
|
||||
|
||||
#define BS16_DRVNUM 36 /* 1@36: Drive number for MSDOS bootstrap */
|
||||
/* 1@37: Reserverd (zero) */
|
||||
/* 1@37: Reserved (zero) */
|
||||
#define BS16_BOOTSIG 38 /* 1@38: Extended boot signature: 0x29 if following valid */
|
||||
#define BS16_VOLID 39 /* 4@39: Volume serial number */
|
||||
#define BS16_VOLLAB 43 /* 11@43: Volume label */
|
||||
#define BS16_FILESYSTYPE 54 /* 8@54: "FAT12 ", "FAT16 ", or "FAT " */
|
||||
|
||||
#define BS16_BOOTCODE 62 /* Boot code may be placed in the remainder of the sector */
|
||||
#define BS16_BOOTCODESIZE 448
|
||||
|
||||
/* The following fields are only valid for FAT32 */
|
||||
|
||||
#define BS32_FATSZ32 36 /* 4@36: Count of sectors occupied by one FAT */
|
||||
@@ -96,6 +99,9 @@
|
||||
#define BS32_VOLLAB 71 /* 11@71: Volume label */
|
||||
#define BS32_FILESYSTYPE 82 /* 8@82: "FAT12 ", "FAT16 ", or "FAT " */
|
||||
|
||||
#define BS32_BOOTCODE 90 /* Boot code may be placed in the remainder of the sector */
|
||||
#define BS32_BOOTCODESIZE 420
|
||||
|
||||
/* If the sector is not an MBR, then it could have a partition table at
|
||||
* this offset.
|
||||
*/
|
||||
@@ -123,6 +129,7 @@
|
||||
#define DIR_WRTDATE 24 /* 2@24: Date of last write */
|
||||
#define DIR_FSTCLUSTLO 26 /* 2@26: LS first cluster number */
|
||||
#define DIR_FILESIZE 28 /* 4@28: File size in bytes */
|
||||
#define DIR_SIZE 32
|
||||
|
||||
/* First byte of the directory name has special meanings: */
|
||||
|
||||
|
||||
+2
-4
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* nuttx/fat.h
|
||||
* include/nuttx/fat.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
@@ -75,9 +75,7 @@ extern "C" {
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/* Non-standard functions to get and set FAT fire/directgory
|
||||
* attributes
|
||||
*/
|
||||
/* Non-standard functions to get and set FAT file/directory attributes */
|
||||
|
||||
EXTERN int fat_getattrib(const char *path, fat_attrib_t *attrib);
|
||||
EXTERN int fat_setattrib(const char *path, fat_attrib_t setbits, fat_attrib_t clearbits);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* nutts/fs.h
|
||||
* include/nuttx/fs.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
+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