Things that use mkfifo() and pipe() depend on CONFIG_PIPES

This commit is contained in:
Gregory Nutt 2016-07-20 10:46:05 -06:00
parent 1a6bb2a47c
commit 7d517413cb
9 changed files with 13 additions and 10 deletions

View File

@ -1489,7 +1489,7 @@ examples/pca9635
examples/pipe
^^^^^^^^^^^^^
A test of the mkfifo() and pipe() APIs.
A test of the mkfifo() and pipe() APIs. Requires CONFIG_PIPES
* CONFIG_EXAMPLES_PIPE_STACKSIZE
Sets the size of the stack to use when creating the child tasks.

View File

@ -4,10 +4,11 @@
#
config EXAMPLES_CPUHOG
bool "CPU hog"
default n
---help---
Enable the cpuhog example
bool "CPU hog"
default n
depends on PIPES
---help---
Enable the cpuhog example
if EXAMPLES_CPUHOG

View File

@ -6,6 +6,7 @@
config EXAMPLES_PIPE
bool "Pipe example"
default n
depends on PIPES
---help---
Enable the pipe example

View File

@ -6,7 +6,7 @@
config EXAMPLES_POLL
bool "Poll example"
default n
depends on !NSH_BUILTIN_APPS
depends on !NSH_BUILTIN_APPS && PIPES
---help---
Enable the poll example

View File

@ -344,6 +344,7 @@ config NSH_DISABLE_MKFIFO
bool "Disable mkfifo"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
depends on PIPES
config NSH_DISABLE_MKRD
bool "Disable mkrd"

View File

@ -1201,7 +1201,7 @@ Command Dependencies on Configuration Settings
mb,mh,mw ---
mkdir (((!CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE) || !CONFIG_DISABLE_PSEUDOFS_OPERATIONS) && CONFIG_NFILE_DESCRIPTORS > 0)
mkfatfs !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
mkfifo CONFIG_NFILE_DESCRIPTORS > 0
mkfifo CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_PIPES
mkrd !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE (see note 4)
mount !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_READABLE (see note 3)
mv (((!CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE) || !CONFIG_DISABLE_PSEUDOFS_OPERATIONS) && CONFIG_NFILE_DESCRIPTORS > 0) (see note 4)

View File

@ -1039,7 +1039,7 @@ int cmd_lsmod(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# if defined(CONFIG_SMART_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSMART)
int cmd_losmart(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif
# ifndef CONFIG_NSH_DISABLE_MKFIFO
# if defined(CONFIG_PIPES) && !defined(CONFIG_NSH_DISABLE_MKFIFO)
int cmd_mkfifo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif
# ifdef CONFIG_FS_READABLE

View File

@ -297,7 +297,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0
# ifndef CONFIG_NSH_DISABLE_MKFIFO
# if defined(CONFIG_PIPES) && !defined(CONFIG_NSH_DISABLE_MKFIFO)
{ "mkfifo", cmd_mkfifo, 2, 2, "<path>" },
# endif
#endif

View File

@ -1181,7 +1181,7 @@ int cmd_mkfatfs(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
#ifndef CONFIG_NSH_DISABLE_MKFIFO
#if defined(CONFIG_PIPES) && !defined(CONFIG_NSH_DISABLE_MKFIFO)
int cmd_mkfifo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
char *fullpath = nsh_getfullpath(vtbl, argv[1]);