summaryrefslogtreecommitdiff
path: root/nuttx/examples/nsh/nsh_fscmds.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-10 19:16:39 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-10 19:16:39 +0000
commit2d0ce7d83a5ee93070da059aa3d6ce85c970c7a4 (patch)
tree1ff5134cd99ef58a3f9a781ba8cfc1e158ccb283 /nuttx/examples/nsh/nsh_fscmds.c
parentb519cf020d830ad425ff6c7e3f2f807ed0268600 (diff)
downloadpx4-nuttx-2d0ce7d83a5ee93070da059aa3d6ce85c970c7a4.tar.gz
px4-nuttx-2d0ce7d83a5ee93070da059aa3d6ce85c970c7a4.tar.bz2
px4-nuttx-2d0ce7d83a5ee93070da059aa3d6ce85c970c7a4.zip
Added mkfifo command to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@812 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh/nsh_fscmds.c')
-rw-r--r--nuttx/examples/nsh/nsh_fscmds.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/nuttx/examples/nsh/nsh_fscmds.c b/nuttx/examples/nsh/nsh_fscmds.c
index a1f8c2ee5..45426604f 100644
--- a/nuttx/examples/nsh/nsh_fscmds.c
+++ b/nuttx/examples/nsh/nsh_fscmds.c
@@ -651,6 +651,21 @@ void cmd_mkfatfs(FAR void *handle, int argc, char **argv)
#endif
/****************************************************************************
+ * Name: cmd_mkfifo
+ ****************************************************************************/
+
+#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0
+void cmd_mkfifo(FAR void *handle, int argc, char **argv)
+{
+ int result = mkfifo(argv[1], 0777);
+ if ( result < 0)
+ {
+ nsh_output(handle, g_fmtcmdfailed, argv[0], "mkfifo", NSH_ERRNO);
+ }
+}
+#endif
+
+/****************************************************************************
* Name: cmd_mount
****************************************************************************/