Added mkfifo command to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@812 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
75ec13c73e
commit
ffbd312fe1
@ -395,4 +395,5 @@
|
|||||||
0.3.13 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
0.3.13 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
* Added mkfatfs command to NSH
|
* Added mkfatfs command to NSH
|
||||||
|
* Added mkfifo command to NSH
|
||||||
|
|
||||||
|
@ -1029,6 +1029,7 @@ buildroot-0.1.0 2007-03-09 <spudmonkey@racsa.co.cr>
|
|||||||
nuttx-0.3.13 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
nuttx-0.3.13 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
* Added mkfatfs command to NSH
|
* Added mkfatfs command to NSH
|
||||||
|
* Added mkfifo command to NSH
|
||||||
|
|
||||||
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
|
@ -130,9 +130,12 @@ extern void cmd_ls(FAR void *handle, int argc, char **argv);
|
|||||||
extern void cmd_mkdir(FAR void *handle, int argc, char **argv);
|
extern void cmd_mkdir(FAR void *handle, int argc, char **argv);
|
||||||
# ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
# ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
||||||
extern void cmd_mkfatfs(FAR void *handle, int argc, char **argv);
|
extern void cmd_mkfatfs(FAR void *handle, int argc, char **argv);
|
||||||
|
# endif /* CONFIG_FS_FAT */
|
||||||
|
extern void cmd_mkfifo(FAR void *handle, int argc, char **argv);
|
||||||
|
# ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
||||||
extern void cmd_mount(FAR void *handle, int argc, char **argv);
|
extern void cmd_mount(FAR void *handle, int argc, char **argv);
|
||||||
#endif
|
# endif /* CONFIG_FS_FAT */
|
||||||
#endif
|
#endif /* !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS */
|
||||||
extern void cmd_ps(FAR void *handle, int argc, char **argv);
|
extern void cmd_ps(FAR void *handle, int argc, char **argv);
|
||||||
#ifndef CONFIG_DISABLE_ENVIRON
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
extern void cmd_set(FAR void *handle, int argc, char **argv);
|
extern void cmd_set(FAR void *handle, int argc, char **argv);
|
||||||
@ -142,8 +145,8 @@ extern void cmd_rm(FAR void *handle, int argc, char **argv);
|
|||||||
extern void cmd_rmdir(FAR void *handle, int argc, char **argv);
|
extern void cmd_rmdir(FAR void *handle, int argc, char **argv);
|
||||||
# ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
# ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
||||||
extern void cmd_umount(FAR void *handle, int argc, char **argv);
|
extern void cmd_umount(FAR void *handle, int argc, char **argv);
|
||||||
#endif
|
# endif /* CONFIG_FS_FAT */
|
||||||
#endif
|
#endif /* !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS */
|
||||||
#ifndef CONFIG_DISABLE_ENVIRON
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
extern void cmd_unset(FAR void *handle, int argc, char **argv);
|
extern void cmd_unset(FAR void *handle, int argc, char **argv);
|
||||||
#endif
|
#endif
|
||||||
|
@ -650,6 +650,21 @@ void cmd_mkfatfs(FAR void *handle, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
* Name: cmd_mount
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -100,8 +100,11 @@ static const struct cmdmap_s g_cmdmap[] =
|
|||||||
#endif
|
#endif
|
||||||
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0
|
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||||
{ "mkdir", cmd_mkdir, 2, 2, "<path>" },
|
{ "mkdir", cmd_mkdir, 2, 2, "<path>" },
|
||||||
#ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
#ifdef CONFIG_FS_FAT
|
||||||
{ "mkfatfs", cmd_mkfatfs, 2, 2, "<path>" },
|
{ "mkfatfs", cmd_mkfatfs, 2, 2, "<path>" },
|
||||||
|
#endif
|
||||||
|
{ "mkfifo", cmd_mkfifo, 2, 2, "<path>" },
|
||||||
|
#ifdef CONFIG_FS_FAT /* Need at least one filesytem in configuration */
|
||||||
{ "mount", cmd_mount, 4, 5, "-t <fstype> <block-device> <dir-path>" },
|
{ "mount", cmd_mount, 4, 5, "-t <fstype> <block-device> <dir-path>" },
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user