CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.

Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
This commit is contained in:
Gregory Nutt 2019-02-11 12:09:26 -06:00
parent 07bcc6292a
commit a64869aa67
141 changed files with 374 additions and 1008 deletions

View file

@ -77,12 +77,9 @@
</p>
<ol>
<li>
First, there are number of things that you must configure in order to be able to use any file system:
First, there are things that you must configure in order to be able to use any file system:
</li>
<ul>
<li>
<code>CONFIG_NFILE_DESCRIPTORS > 0</code>. You must include support for file descriptors.
</li>
<li>
<code>CONFIG_DISABLE_MOUNTPOINT=n</code>. You must include support for mount points in the pseudo-file system.
</li>

View file

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1>
<p>Last Updated: January 19, 2019</p>
<p>Last Updated: February 11, 2019</p>
</td>
</tr>
</table>
@ -3616,22 +3616,22 @@ nsh&gt;
</tr>
<tr>
<td><b><code>cat</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>&nbsp;</td>
<td><code>CONFIG_NSH_DISABLE_CAT</code></td>
</tr>
<tr>
<td><b><code>cd</code></b></td>
<td>!<code>CONFIG_DISABLE_ENVIRON</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>!<code>CONFIG_DISABLE_ENVIRON</code></td>
<td><code>CONFIG_NSH_DISABLE_CD</code></td>
</tr>
<tr>
<td><b><code>cmp</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>&nbsp;</td>
<td><code>CONFIG_NSH_DISABLE_CMP</code></td>
</tr>
<tr>
<td><b><code>cp</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>&nbsp;</td>
<td><code>CONFIG_NSH_DISABLE_CP</code></td>
</tr>
<tr>
@ -3641,7 +3641,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>dd</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>&nbsp;</td>
<td><code>CONFIG_NSH_DISABLE_DD</code></td>
</tr>
<tr>
@ -3651,7 +3651,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>df</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
<td><code>CONFIG_NSH_DISABLE_DF</code></td>
</tr>
<tr>
@ -3666,7 +3666,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>env</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_PROCFS</code> &amp;&amp; !<code>CONFIG_DISABLE_ENVIRON</code> &amp;&amp; !<code>CONFIG_PROCFS_EXCLUDE_ENVIRON</code>
<td><code>CONFIG_FS_PROCFS</code> &amp;&amp; !<code>CONFIG_DISABLE_ENVIRON</code> &amp;&amp; !<code>CONFIG_PROCFS_EXCLUDE_ENVIRON</code>
<td><code>CONFIG_NSH_DISABLE_ENV</code></td>
</tr>
<tr>
@ -3691,8 +3691,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>get</code></b></td>
<td><code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NET_UDP</code> &amp;&amp;
<code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <i>MTU</i> &gt;= 558<sup>1</sup></td>
<td><code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NET_UDP</code> &amp;&amp; <i>MTU</i> &gt;= 558<sup>1</sup></td>
<td><code>CONFIG_NSH_DISABLE_GET</code></td>
</tr>
<tr>
@ -3702,7 +3701,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>hexdump</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>&nbsp;</td>
<td><code>CONFIG_NSH_DISABLE_HEXDUMP</code></td>
</tr>
<tr>
@ -3737,17 +3736,17 @@ nsh&gt;
</tr>
<tr>
<td><b><code>losetup</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_DEV_LOOP</code></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_DEV_LOOP</code></td>
<td><code>CONFIG_NSH_DISABLE_LOSETUP</code></td>
</tr>
<tr>
<td><b><code>ln</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_PSEUDOFS_SOFTLINKS</code></td>
<td><code>CONFIG_PSEUDOFS_SOFTLINKS</code></td>
<td><code>CONFIG_NSH_DISABLE_LN</code></td>
</tr>
<tr>
<td><b><code>ls</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>&nbsp;</td>
<td><code>CONFIG_NSH_DISABLE_LS</code></td>
</tr>
<tr>
@ -3771,37 +3770,37 @@ nsh&gt;
</tr>
<tr>
<td><b><code>mkdir</code></b></td>
<td>(((!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code>) &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0)<sup>4</sup></td>
<td>(((!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code>)</td>
<td><code>CONFIG_NSH_DISABLE_MKDIR</code></td>
</tr>
<tr>
<td><b><code>mkfatfs</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FSUTILS_MKFATFS</code></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FSUTILS_MKFATFS</code></td>
<td><code>CONFIG_NSH_DISABLE_MKFATFS</code></td>
</tr>
<tr>
<td><b><code>mkfifo</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_PIPES</code> &amp;&amp; <code>CONFIG_DEV_FIFO_SIZE</code> &gt; 0</td>
<td><code>CONFIG_PIPES</code> &amp;&amp; <code>CONFIG_DEV_FIFO_SIZE</code> &gt; 0</td>
<td><code>CONFIG_NSH_DISABLE_MKFIFO</code></td>
</tr>
<tr>
<td><b><code>mkrd</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_WRITABLE</code><sup>4</sup></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code><sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_MKRD</code></td>
</tr>
<tr>
<td><b><code>mount</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
<td><code>CONFIG_NSH_DISABLE_MOUNT</code></td>
</tr>
<tr>
<td><b><code>mv</code></b></td>
<td>(((!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code>) &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0)<sup>4</sup></td>
<td>(!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code><sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_MV</code></td>
</tr>
<tr>
<td><b><code>nfsmount</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NFS</code></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NFS</code></td>
<td><code>CONFIG_NSH_DISABLE_NFSMOUNT</code></td>
</tr>
<tr>
@ -3811,7 +3810,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>passwd</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_WRITABLE</code> &amp;&amp; <code>CONFIG_NSH_LOGIN_PASSWD</code></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code> &amp;&amp; <code>CONFIG_NSH_LOGIN_PASSWD</code>sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_PASSWD</code></td>
</tr>
<tr>
@ -3827,17 +3826,17 @@ nsh&gt;
<tr>
<td><b><code>put</code></b></td>
<td><code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NET_UDP</code> &amp;&amp;
<code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <i>MTU</i> &gt;= 558<sup>1,2</sup></td>
<code><i>MTU</i> &gt;= 558<sup>1,2</sup></td>
<td><code>CONFIG_NSH_DISABLE_PUT</code></td>
</tr>
<tr>
<td><b><code>pwd</code></b></td>
<td>!<code>CONFIG_DISABLE_ENVIRON</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>!<code>CONFIG_DISABLE_ENVIRON</code></td>
<td><code>CONFIG_NSH_DISABLE_PWD</code></td>
</tr>
<tr>
<td><b><code>readlink</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_PSEUDOFS_SOFTLINKS</code></td>
<td><code>CONFIG_PSEUDOFS_SOFTLINKS</code></td>
<td><code>CONFIG_NSH_DISABLE_READLINK</code></td>
</tr>
<tr>
@ -3847,12 +3846,12 @@ nsh&gt;
</tr>
<tr>
<td><b><code>rm</code></b></td>
<td>(((!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code>) &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0)<sup>4</sup></td>
<td>(!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code><sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_RM</code></td>
</tr>
<tr>
<td><b><code>rmdir</code></b></td>
<td>(((!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code>) &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0)<sup>4</sup></td>
<td>(!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code>) || !<code>CONFIG_DISABLE_PSEUDOFS_OPERATIONS</code><sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_RMDIR</code></td>
</tr>
<tr>
@ -3872,7 +3871,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>sh</code></b></td>
<td><code>CONFIG_NFILE_DESCRIPTORS &gt; 0 &amp;&amp; <code>CONFIG_NFILE_STREAMS &gt; 0 &amp;&amp; !<code>CONFIG_NSH_DISABLESCRIPT</code></td>
<td><code>CONFIG_NFILE_STREAMS &gt; 0 &amp;&amp; !<code>CONFIG_NSH_DISABLESCRIPT</code></td>
<td><code>CONFIG_NSH_DISABLE_SH</code></td>
</tr>
<tr>
@ -3902,12 +3901,12 @@ nsh&gt;
</tr>
<tr>
<td><b><code>truncate</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code></td>
<td><code>CONFIG_NSH_DISABLE_TRUNCATE</code></td>
</tr>
<tr>
<td><b><code>umount</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
<td><code>CONFIG_NSH_DISABLE_UMOUNT</code></td>
</tr>
<tr>
@ -3932,12 +3931,12 @@ nsh&gt;
</tr>
<tr>
<td><b><code>useradd</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_WRITABLE</code> &amp;&amp; <code>CONFIG_NSH_LOGIN_PASSWD</code></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code> &amp;&amp; <code>CONFIG_NSH_LOGIN_PASSWD</code>sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_USERADD</code></td>
</tr>
<tr>
<td><b><code>userdel</code></b></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0 &amp;&amp; <code>CONFIG_FS_WRITABLE</code> &amp;&amp; <code>CONFIG_NSH_LOGIN_PASSWD</code></td>
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> &amp;&amp; <code>CONFIG_FS_WRITABLE</code> &amp;&amp; <code>CONFIG_NSH_LOGIN_PASSWD</code>sup>4</sup></td>
<td><code>CONFIG_NSH_DISABLE_USERDEL</code></td>
</tr>
<tr>
@ -3947,8 +3946,7 @@ nsh&gt;
</tr>
<tr>
<td><b><code>wget</code></b></td>
<td><code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NET_TCP</code> &amp;&amp;
<code>CONFIG_NFILE_DESCRIPTORS</code> &gt; 0</td>
<td><code>CONFIG_NET</code> &amp;&amp; <code>CONFIG_NET_TCP</code></td>
<td><code>CONFIG_NSH_DISABLE_WGET</code></td>
</tr>
<tr>

View file

@ -4926,9 +4926,7 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len,
</p>
<p><b>Pseudo Root File System</b>.
Or, a simple <i>in-memory</i>, <i>pseudo</i> file system can be enabled.
This simple file system can be enabled setting the CONFIG_NFILE_DESCRIPTORS
option to a non-zero value (see <a href="#apndxconfigs">Appendix A</a>).
A simple <i>in-memory</i>, <i>pseudo</i> file system can be enabled by default.
This is an <i>in-memory</i> file system because it does not require any
storage medium or block driver support.
Rather, file system contents are generated on-the-fly as referenced via
@ -4985,9 +4983,8 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len,
<li>Other <i>Specialized</i> Drivers.</li>
</ul>
These different device driver types are discussed in the following paragraphs.
Note: device driver support requires that the <i>in-memory</i>, <i>pseudo</i> file system
is enabled by setting the CONFIG_NFILE_DESCRIPTORS in the NuttX configuration file to a
non-zero value.
Note: device driver support depends on the <i>in-memory</i>, <i>pseudo</i> file system
that is enabled by default.
</p>
<h2><a name="chardrivers">6.1 Character Device Drivers</a></h2>

View file

@ -8465,9 +8465,7 @@ interface of the same name.
</p>
<p><b>Pseudo Root File System</b>.
Or, a simple <i>in-memory</i>, <i>pseudo</i> file system can be enabled.
This simple file system can be enabled setting the CONFIG_NFILE_DESCRIPTORS
option to a non-zero value.
A simple <i>in-memory</i>, <i>pseudo</i> file system can be enabled by default.
This is an <i>in-memory</i> file system because it does not require any
storage medium or block driver support.
Rather, file system contents are generated on-the-fly as referenced via
@ -8583,7 +8581,6 @@ interface of the same name.
in your NuttX configuration file:
</p>
<ul>
<li><code>CONFIG_NFILE_DESCRIPTORS</code> Defined to be greater than 0</li>
<li><code>CONFIG_DISABLE_POLL</code> NOT defined</li>
</ul>
<p>

View file

@ -80,18 +80,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -102,7 +99,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -166,7 +166,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -188,7 +187,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -213,7 +211,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -232,7 +230,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -57,7 +57,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS == 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -149,7 +149,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -68,7 +68,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -74,7 +74,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -79,18 +79,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -101,7 +98,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -74,7 +74,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE
@ -207,7 +207,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -229,7 +228,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -254,7 +252,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -273,7 +271,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -151,13 +151,8 @@ void up_lowinit(void);
/* Defined in chip/xxx_serial.c */
#if CONFIG_NFILE_DESCRIPTORS > 0
void up_earlyserialinit(void);
void up_serialinit(void);
#else
# define up_earlyserialinit()
# define up_serialinit()
#endif
/* Defined in drivers/lowconsole.c */

View file

@ -79,18 +79,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -101,7 +98,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -129,7 +129,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -151,7 +150,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -176,7 +174,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -195,7 +193,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -57,7 +57,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE
@ -163,13 +163,8 @@ void hc_timer_initialize(void);
/* Debug output */
#if CONFIG_NFILE_DESCRIPTORS > 0
void up_earlyserialinit(void);
void up_serialinit(void);
#else
# define up_earlyserialinit()
# define up_serialinit()
#endif
#ifdef CONFIG_DEV_LOWCONSOLE
void lowconsole_init(void);

View file

@ -81,18 +81,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -103,7 +100,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -131,7 +131,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -153,7 +152,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -178,7 +176,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -197,7 +195,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -54,7 +54,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE
@ -236,13 +236,8 @@ void up_addregion(void);
/* Serial output */
void up_lowputc(char ch);
#if CONFIG_NFILE_DESCRIPTORS > 0
void up_earlyserialinit(void);
void up_serialinit(void);
#else
# define up_earlyserialinit()
# define up_serialinit()
#endif
/* System timer */

View file

@ -74,7 +74,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -74,18 +74,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -96,7 +93,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefssinfo);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -74,7 +74,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -74,18 +74,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -95,7 +92,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
sinfo(" fd=%d refcount=%d\n", i, inode->i_crefssinfo);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -79,18 +79,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -101,7 +98,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefssinfo);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -225,7 +225,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -247,7 +246,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -270,7 +268,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -293,7 +291,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -57,7 +57,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS == 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -79,18 +79,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -101,7 +98,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -112,7 +112,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -134,7 +133,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -162,7 +160,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -181,7 +179,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -62,7 +62,7 @@
* a serial console is assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE
@ -165,13 +165,8 @@ void up_vectorfiq(void);
/* Defined in xyz_serial.c */
#if CONFIG_NFILE_DESCRIPTORS > 0
void up_earlyconsoleinit(void);
void up_consoleinit(void);
#else
# define up_earlyconsoleinit()
# define up_consoleinit()
#endif
/* Defined in drivers/lowconsole.c */

View file

@ -81,18 +81,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -103,7 +100,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -131,7 +131,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -142,8 +141,6 @@ void up_initialize(void)
devzero_register(); /* Standard /dev/zero */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
/* Initialize the serial device driver */
#ifdef USE_SERIALDRIVER
@ -162,7 +159,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();

View file

@ -77,7 +77,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -207,7 +207,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -229,7 +228,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -250,7 +248,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -269,7 +267,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -85,7 +85,7 @@
/* Determine which (if any) console driver to use */
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS == 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_DEVCONSOLE
# undef CONFIG_RAMLOG_CONSOLE
#else

View file

@ -79,18 +79,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -101,7 +98,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -131,7 +131,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -153,7 +152,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -178,7 +176,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -197,7 +195,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -56,7 +56,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE
@ -202,13 +202,8 @@ void up_addregion(void);
/* Defined in xyz_serial.c */
#if CONFIG_NFILE_DESCRIPTORS > 0
void up_earlyserialinit(void);
void up_serialinit(void);
#else
# define up_earlyserialinit()
# define up_serialinit()
#endif
/* Defined in drivers/lowconsole.c */

View file

@ -57,7 +57,7 @@
* assumed.
*/
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE
@ -329,13 +329,8 @@ void xtensa_add_region(void);
/* Serial output */
void up_lowputc(char ch);
#if CONFIG_NFILE_DESCRIPTORS > 0
void xtensa_early_serial_initialize(void);
void xtensa_serial_initialize(void);
#else
# define xtensa_earlyserialinit()
# define xtensa_serial_initialize()
#endif
/* System timer */

View file

@ -80,18 +80,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _xtensa_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -102,7 +99,6 @@ static void _xtensa_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -139,7 +139,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -161,7 +160,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -186,7 +184,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -205,7 +203,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -79,18 +79,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -101,7 +98,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -131,7 +131,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -153,7 +152,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -178,7 +176,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -197,7 +195,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -62,10 +62,10 @@
*/
#if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) || \
CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
defined(CONFIG_DEV_LOWCONSOLE)
# define USE_LOWCONSOLE 1
# define USE_LOWUARTINIT 1
#elif !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#elif !defined(CONFIG_DEV_CONSOLE)
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -81,18 +81,15 @@
#ifdef CONFIG_DUMP_ON_EXIT
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *filelist;
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *streamlist;
#endif
int i;
#endif
sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
#if CONFIG_NFILE_DESCRIPTORS > 0
filelist = tcb->group->tg_filelist;
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
{
@ -103,7 +100,6 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
i, inode->i_crefs);
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
streamlist = tcb->group->tg_streamlist;

View file

@ -128,7 +128,6 @@ void up_initialize(void)
iob_initialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Register devices */
#if defined(CONFIG_DEV_NULL)
@ -150,7 +149,6 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOOP)
loop_register(); /* Standard /dev/loop */
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if defined(CONFIG_SCHED_INSTRUMENTATION_BUFFER) && \
defined(CONFIG_DRIVER_NOTE)
@ -175,7 +173,7 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_PSEUDOTERM_SUSV1)
#ifdef CONFIG_PSEUDOTERM_SUSV1
/* Register the master pseudo-terminal multiplexor device */
(void)ptmx_register();
@ -194,7 +192,7 @@ void up_initialize(void)
up_cryptoinitialize();
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_CRYPTO_CRYPTODEV)
#ifdef CONFIG_CRYPTO_CRYPTODEV
devcrypto_register();
#endif

View file

@ -57,14 +57,14 @@
* assumed.
*/
#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
#if defined(CONFIG_DEV_LOWCONSOLE)
# undef USE_SERIALDRIVER
# ifdef CONFIG_HAVE_LOWSERIALINIT
# define USE_LOWSERIALINIT 1
# else
# undef USE_LOWSERIALINIT
# endif
#elif !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
#elif !defined(CONFIG_DEV_CONSOLE)
# undef USE_SERIALDRIVER
# undef USE_LOWSERIALINIT
# undef CONFIG_DEV_LOWCONSOLE

View file

@ -12,7 +12,6 @@ the NuttX apps/ package and that you have named the directory apps/).
Other required configuration settings:
CONFIG_NFILE_DESCRIPTORS > 3
CONFIG_BINFMT_DISABLE=n
CONFIG_BINFMT_PCODE=y

View file

@ -67,10 +67,6 @@
* are required -- only the more obvious.
*/
#if CONFIG_NFILE_DESCRIPTORS < 1
# error You must provide file descriptors via CONFIG_NFILE_DESCRIPTORS in your configuration file
#endif
#ifdef CONFIG_BINFMT_DISABLE
# error The binary loader is disabled (CONFIG_BINFMT_DISABLE)!
#endif

View file

@ -20,7 +20,7 @@ CONFIG_IDLETHREAD_STACKSIZE=256
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_MOTOROLA_SREC=y
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_DESCRIPTORS=3
CONFIG_NFILE_STREAMS=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0

View file

@ -183,10 +183,7 @@ if [ "$answer" = n ]; then
echo "EXTERN(pthread_initialize)" >>ld-locked.inc
fi
answer=$(checkzero CONFIG_NFILE_DESCRIPTORS)
if [ "$answer" = n ]; then
echo "EXTERN(fs_initialize)" >>ld-locked.inc
fi
echo "EXTERN(fs_initialize)" >>ld-locked.inc
answer=$(checkconfig CONFIG_NET)
if [ "$answer" = y ]; then

View file

@ -19,7 +19,7 @@ CONFIG_IDLETHREAD_STACKSIZE=256
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_MOTOROLA_SREC=y
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_DESCRIPTORS=3
CONFIG_NFILE_STREAMS=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0

View file

@ -16,7 +16,7 @@ CONFIG_GRAN=y
CONFIG_HOST_WINDOWS=y
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_DESCRIPTORS=3
CONFIG_NFILE_STREAMS=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0

View file

@ -10,7 +10,7 @@ index ba7dbe7..45e4ab1 100644
#include <assert.h>
#include <errno.h>
#include <debug.h>
@@ -79,8 +80,13 @@ static FAR struct nsh_vtbl_s *nsh_consoleclone(FAR struct nsh_vtbl_s *vtbl);
@@ -79,7 +80,12 @@ static FAR struct nsh_vtbl_s *nsh_consoleclone(FAR struct nsh_vtbl_s *vtbl);
static void nsh_consolerelease(FAR struct nsh_vtbl_s *vtbl);
static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl,
FAR const void *buffer, size_t nbytes);
@ -23,7 +23,6 @@ index ba7dbe7..45e4ab1 100644
+#endif
static FAR char *nsh_consolelinebuffer(FAR struct nsh_vtbl_s *vtbl);
#if CONFIG_NFILE_DESCRIPTORS > 0
@@ -213,6 +219,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, FAR const void *buf
*
****************************************************************************/
@ -32,14 +31,13 @@ index ba7dbe7..45e4ab1 100644
static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
FAR const char *fmt, ...)
{
@@ -263,6 +270,51 @@ static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
@@ -263,6 +270,29 @@ static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
#endif
}
+#else
+static int nsh_consolevoutput(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, va_list ap)
+{
+#if CONFIG_NFILE_DESCRIPTORS > 0
+ FAR struct console_stdio_s *pstate = (FAR struct console_stdio_s *)vtbl;
+ int ret;
+
@ -56,27 +54,6 @@ index ba7dbe7..45e4ab1 100644
+ ret = vfprintf(pstate->cn_outstream, fmt, ap);
+
+ return ret;
+#else
+ char *str;
+
+ /* Use vasprintf() to allocate a buffer and fill it with the formatted
+ * data
+ */
+
+ str = NULL;
+ (void)vasprintf(&str, fmt, ap);
+
+ /* Was a string allocated? */
+
+ if (str)
+ {
+ /* Yes.. Print then free the allocated string */
+
+ printf("%s", str);
+ free(str);
+ }
+
+ return 0;
+#endif
+}
+#endif
@ -138,7 +115,7 @@ index c78362f..207f9b9 100644
/* Size of info to be saved in call to nsh_redirect */
@@ -107,7 +110,11 @@ struct nsh_vtbl_s
@@ -107,6 +110,10 @@ struct nsh_vtbl_s
void (*release)(FAR struct nsh_vtbl_s *vtbl);
#endif
ssize_t (*write)(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes);
@ -148,7 +125,6 @@ index c78362f..207f9b9 100644
+ int (*voutput)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, va_list ap);
+#endif
FAR char *(*linebuffer)(FAR struct nsh_vtbl_s *vtbl);
#if CONFIG_NFILE_DESCRIPTORS > 0
void (*redirect)(FAR struct nsh_vtbl_s *vtbl, int fd, FAR uint8_t *save);
@@ -159,5 +166,6 @@ struct console_stdio_s
/* Defined in nsh_console.c *************************************************/

View file

@ -12,7 +12,7 @@ CONFIG_DISABLE_POLL=y
CONFIG_DISABLE_PTHREAD=y
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_DESCRIPTORS=3
CONFIG_NFILE_STREAMS=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0

View file

@ -36,10 +36,6 @@
-include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = z80_irq.c z80_timerisr.c z80_lowputc.c
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
CSRCS += z80_serial.c
endif
CSRCS = z80_irq.c z80_timerisr.c z80_lowputc.c z80_serial.c
include $(TOPDIR)/configs/Board.mk

View file

@ -55,7 +55,7 @@
#include "up_arch.h"
#include "up_internal.h"
#if defined(USE_SERIALDRIVER) && CONFIG_NFILE_DESCRIPTORS > 0
#ifdef USE_SERIALDRIVER
/****************************************************************************
* Private Function Prototypes
@ -336,7 +336,7 @@ void up_serialinit(void)
(void)uart_register("/dev/ttyS0", &g_uartport);
}
#endif /* USE_SERIALDRIVER && CONFIG_NFILE_DESCRIPTORS > 0 */
#endif /* USE_SERIALDRIVER */
/****************************************************************************
* Name: up_putc

View file

@ -17,7 +17,7 @@ CONFIG_HOST_WINDOWS=y
CONFIG_IDLETHREAD_STACKSIZE=256
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_DESCRIPTORS=3
CONFIG_NFILE_STREAMS=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0

View file

@ -16,7 +16,7 @@ CONFIG_HOST_WINDOWS=y
CONFIG_IDLETHREAD_STACKSIZE=256
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_NFILE_DESCRIPTORS=0
CONFIG_NFILE_DESCRIPTORS=3
CONFIG_NFILE_STREAMS=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0

View file

@ -83,8 +83,7 @@ include wireless$(DELIM)Make.defs
include contactless$(DELIM)Make.defs
include 1wire$(DELIM)Make.defs
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
CSRCS += dev_null.c dev_zero.c
CSRCS += dev_null.c dev_zero.c
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
CSRCS += ramdisk.c
@ -96,7 +95,6 @@ ifeq ($(CONFIG_DRVR_READAHEAD),y)
endif
endif
endif
endif # CONFIG_NFILE_DESCRIPTORS != 0
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))

View file

@ -33,7 +33,6 @@
#
############################################################################
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
# Include BCH driver
@ -49,4 +48,4 @@ VPATH += :bch
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)bch}
endif
endif

View file

@ -33,8 +33,6 @@
#
############################################################################
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
# Include pipe driver
CSRCS += pipe.c fifo.c pipe_common.c
@ -43,4 +41,4 @@ CSRCS += pipe.c fifo.c pipe_common.c
DEPPATH += --dep-path pipes
VPATH += :pipes
endif

View file

@ -33,8 +33,6 @@
#
############################################################################
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
# Include serial drivers
CSRCS += serial.c serial_io.c lowconsole.c
@ -66,4 +64,4 @@ endif
DEPPATH += --dep-path serial
VPATH += :serial
endif

View file

@ -100,9 +100,7 @@ EXTERN FAR const struct syslog_channel_s *g_syslog_channel;
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int syslog_dev_initialize(FAR const char *devpath, int oflags, int mode);
#endif
/****************************************************************************
* Name: syslog_dev_uninitialize
@ -124,7 +122,7 @@ int syslog_dev_initialize(FAR const char *devpath, int oflags, int mode);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SYSLOG_FILE)
#ifdef CONFIG_SYSLOG_FILE
int syslog_dev_uninitialize(void);
#endif /* CONFIG_SYSLOG_FILE */
@ -343,9 +341,7 @@ ssize_t syslog_dev_write(FAR const char *buffer, size_t buflen);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int syslog_dev_putc(int ch);
#endif
/****************************************************************************
* Name: syslog_dev_flush
@ -361,9 +357,7 @@ int syslog_dev_putc(int ch);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int syslog_dev_flush(void);
#endif
#undef EXTERN
#ifdef __cplusplus

View file

@ -58,8 +58,6 @@
#include "syslog.h"
#if CONFIG_NFILE_DESCRIPTORS > 0
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -698,4 +696,3 @@ int syslog_dev_flush(void)
return OK;
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */

View file

@ -75,7 +75,7 @@
/* Don't compile if prerequisites are not met */
#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_INT_DISABLE) && CONFIG_NFILE_DESCRIPTORS > 0
#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_INT_DISABLE)
/****************************************************************************
* Pre-processor Definitions
@ -2448,4 +2448,4 @@ int usbhost_kbdinit(void)
return usbhost_registerclass(&g_hidkbd);
}
#endif /* CONFIG_USBHOST)&& !CONFIG_USBHOST_INT_DISABLE && CONFIG_NFILE_DESCRIPTORS */
#endif /* CONFIG_USBHOST)&& !CONFIG_USBHOST_INT_DISABLE */

View file

@ -73,7 +73,7 @@
/* Don't compile if prerequisites are not met */
#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_INT_DISABLE) && CONFIG_NFILE_DESCRIPTORS > 0
#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_INT_DISABLE)
/****************************************************************************
* Pre-processor Definitions
@ -2577,4 +2577,4 @@ int usbhost_mouse_init(void)
return usbhost_registerclass(&g_hidmouse);
}
#endif /* CONFIG_USBHOST)&& !CONFIG_USBHOST_INT_DISABLE && CONFIG_NFILE_DESCRIPTORS */
#endif /* CONFIG_USBHOST)&& !CONFIG_USBHOST_INT_DISABLE */

View file

@ -64,7 +64,7 @@
/* Don't compile if prerequisites are not met */
#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_BULK_DISABLE) && \
!defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0
!defined(CONFIG_DISABLE_MOUNTPOINT)
/****************************************************************************
* Pre-processor Definitions
@ -2317,4 +2317,5 @@ int usbhost_msc_initialize(void)
return usbhost_registerclass(&g_storage);
}
#endif /* CONFIG_USBHOST && !CONFIG_USBHOST_BULK_DISABLE && !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 */
#endif /* CONFIG_USBHOST && !CONFIG_USBHOST_BULK_DISABLE && !CONFIG_DISABLE_MOUNTPOINT */

View file

@ -59,7 +59,6 @@ include shm/Make.defs
# Additional files required is mount-able file systems are supported
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
include mount/Make.defs
@ -79,7 +78,6 @@ include userfs/Make.defs
include hostfs/Make.defs
include littlefs/Make.defs
endif
endif
COBJS = $(CSRCS:.c=$(OBJEXT))

View file

@ -63,24 +63,16 @@
# define CONFIG_FS_NAIOC 8
#endif
#undef AIO_HAVE_FILEP
#undef AIO_HAVE_PSOCK
#if CONFIG_NFILE_DESCRIPTORS > 0
# define AIO_HAVE_FILEP
#endif
#if defined(CONFIG_NET_TCP) && CONFIG_NSOCKET_DESCRIPTORS > 0
# define AIO_HAVE_PSOCK
#endif
#if !defined(AIO_HAVE_FILEP) && !defined(AIO_HAVE_PSOCK)
# error AIO needs file and/or socket descriptors
#endif
/****************************************************************************
* Public Types
****************************************************************************/
/* This structure contains one AIO control block and appends information
* needed by the logic running on the worker thread. These structures are
* pre-allocated, the number pre-allocated controlled by CONFIG_FS_NAIOC.
@ -93,9 +85,7 @@ struct aio_container_s
FAR struct aiocb *aioc_aiocbp; /* The contained AIO control block */
union
{
#ifdef AIO_HAVE_FILEP
FAR struct file *aioc_filep; /* File structure to use with the I/O */
#endif
#ifdef AIO_HAVE_PSOCK
FAR struct socket *aioc_psock; /* Socket structure to use with the I/O */
#endif

View file

@ -94,10 +94,9 @@ static void aio_read_worker(FAR void *arg)
#endif
aiocbp = aioc_decant(aioc);
#if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK)
#ifdef AIO_HAVE_PSOCK
if (aiocbp->aio_fildes < CONFIG_NFILE_DESCRIPTORS)
#endif
#ifdef AIO_HAVE_FILEP
{
/* Perform the file read using:
*
@ -110,11 +109,8 @@ static void aio_read_worker(FAR void *arg)
nread = file_pread(aioc->u.aioc_filep, (FAR void *)aiocbp->aio_buf,
aiocbp->aio_nbytes, aiocbp->aio_offset);
}
#endif
#if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK)
else
#endif
#ifdef AIO_HAVE_PSOCK
else
{
/* Perform the socket receive using:
*

View file

@ -81,9 +81,7 @@ static void aio_write_worker(FAR void *arg)
uint8_t prio;
#endif
ssize_t nwritten = 0;
#ifdef AIO_HAVE_FILEP
int oflags;
#endif
/* Get the information from the container, decant the AIO control block,
* and free the container before starting any I/O. That will minimize
@ -97,10 +95,9 @@ static void aio_write_worker(FAR void *arg)
#endif
aiocbp = aioc_decant(aioc);
#if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK)
#ifdef AIO_HAVE_PSOCK
if (aiocbp->aio_fildes < CONFIG_NFILE_DESCRIPTORS)
#endif
#ifdef AIO_HAVE_FILEP
{
/* Call fcntl(F_GETFL) to get the file open mode. */
@ -138,11 +135,8 @@ static void aio_write_worker(FAR void *arg)
aiocbp->aio_offset);
}
}
#endif
#if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK)
else
#endif
#ifdef AIO_HAVE_PSOCK
else
{
/* Perform the send using:
*
@ -166,9 +160,7 @@ static void aio_write_worker(FAR void *arg)
aiocbp->aio_result = nwritten;
#ifdef AIO_HAVE_FILEP
errout:
#endif
/* Signal the client */

View file

@ -76,10 +76,8 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp)
FAR struct aio_container_s *aioc;
union
{
#ifdef AIO_HAVE_FILEP
FAR struct file *filep;
#endif
#ifdef AIO_HAVE_FILEP
#ifdef AIO_HAVE_PSOCK
FAR struct socket *psock;
#endif
FAR void *ptr;
@ -89,10 +87,9 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp)
#endif
int ret;
#if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK)
#ifdef AIO_HAVE_PSOCK
if (aiocbp->aio_fildes < CONFIG_NFILE_DESCRIPTORS)
#endif
#ifdef AIO_HAVE_FILEP
{
/* Get the file structure corresponding to the file descriptor. */
@ -104,11 +101,8 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp)
DEBUGASSERT(u.filep != NULL);
}
#endif
#if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK)
else
#endif
#ifdef AIO_HAVE_PSOCK
else
{
/* Get the socket structure corresponding to the socket descriptor */

View file

@ -33,14 +33,10 @@
#
############################################################################
# Don't build anything if there are no file descriptors
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
CSRCS += fs_closedir.c fs_opendir.c fs_readdir.c fs_rewinddir.c fs_seekdir.c
# Include dirent build support
DEPPATH += --dep-path dirent
VPATH += :dirent
endif

View file

@ -33,10 +33,6 @@
#
############################################################################
# Don't build anything if there are no file descriptors
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
CSRCS += fs_registerdriver.c fs_unregisterdriver.c
# Don't build-in block driver support if there are no mountpoints
@ -63,4 +59,3 @@ endif # CONFIG_DISABLE_MOUNTPOINT
DEPPATH += --dep-path driver
VPATH += :driver
endif

View file

@ -33,10 +33,6 @@
#
############################################################################
# Don't build anything if there are no file descriptors
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
CSRCS += fs_files.c fs_foreachinode.c fs_inode.c fs_inodeaddref.c
CSRCS += fs_inodebasename.c fs_inodefind.c fs_inodefree.c fs_inoderelease.c
CSRCS += fs_inoderemove.c fs_inodereserve.c fs_inodesearch.c
@ -46,4 +42,4 @@ CSRCS += fs_fileopen.c fs_filedetach.c fs_fileclose.c
DEPPATH += --dep-path inode
VPATH += :inode
endif

View file

@ -109,7 +109,6 @@ static inline void _files_semtake(FAR struct filelist *list)
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_detach(int fd, FAR struct file *filep)
{
FAR struct filelist *list;
@ -165,5 +164,4 @@ int file_detach(int fd, FAR struct file *filep)
_files_semgive(list);
return OK;
}
#endif

View file

@ -33,9 +33,8 @@
#
############################################################################
# Don't build anything if there are no file descriptors
# Don't build anything if there is no mountpoint support
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
CSRCS += fs_mount.c fs_umount2.c fs_foreachmountpoint.c
@ -56,4 +55,4 @@ DEPPATH += --dep-path mount
VPATH += :mount
endif
endif

View file

@ -1049,9 +1049,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
size_t buflen, off_t offset)
{
FAR struct task_group_s *group = tcb->group;
#if CONFIG_NFILE_DESCRIPTORS > 0 /* Guaranteed to be true */
FAR struct file *file;
#endif
#if CONFIG_NSOCKET_DESCRIPTORS > 0
FAR struct socket *socket;
#endif
@ -1066,7 +1064,6 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
remaining = buflen;
totalsize = 0;
#if CONFIG_NFILE_DESCRIPTORS > 0 /* Guaranteed to be true */
linesize = snprintf(procfile->line, STATUS_LINELEN, "\n%-3s %-8s %s\n",
"FD", "POS", "OFLAGS");
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset);
@ -1082,7 +1079,9 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
/* Examine each open file descriptor */
for (i = 0, file = group->tg_filelist.fl_files; i < CONFIG_NFILE_DESCRIPTORS; i++, file++)
for (i = 0, file = group->tg_filelist.fl_files;
i < CONFIG_NFILE_DESCRIPTORS;
i++, file++)
{
/* Is there an inode associated with the file descriptor? */
@ -1102,7 +1101,6 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
}
}
}
#endif
#if CONFIG_NSOCKET_DESCRIPTORS > 0
linesize = snprintf(procfile->line, STATUS_LINELEN, "\n%-3s %-2s %-3s %s\n",

View file

@ -33,42 +33,6 @@
#
############################################################################
# If there are no file descriptors configured, then a small part of the
# logic in this directory may still apply to socket descriptors
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
# Socket descriptor support
CSRCS += fs_close.c fs_read.c fs_write.c fs_ioctl.c
# Support for network access using streams
ifneq ($(CONFIG_NFILE_STREAMS),0)
CSRCS += fs_fdopen.c
endif
# Support for poll() and select() (which derives from poll()
ifneq ($(CONFIG_DISABLE_POLL),y)
CSRCS += fs_poll.c fs_select.c
endif
# Support for sendfile()
ifeq ($(CONFIG_NET_SENDFILE),y)
CSRCS += fs_sendfile.c
endif
# Include vfs build support
DEPPATH += --dep-path vfs
VPATH += :vfs
endif
else
# Common file/socket descriptor support
CSRCS += fs_close.c fs_dup.c fs_dup2.c fs_fcntl.c fs_dupfd.c fs_dupfd2.c
@ -106,4 +70,3 @@ endif
DEPPATH += --dep-path vfs
VPATH += :vfs
endif

View file

@ -82,24 +82,20 @@
int close(int fd)
{
int errcode;
#if CONFIG_NFILE_DESCRIPTORS > 0
int ret;
#endif
/* close() is a cancellation point */
(void)enter_cancellation_point();
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Did we get a valid file descriptor? */
if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS)
#endif
{
/* Close a socket descriptor */
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS))
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))
{
ret = net_close(fd);
if (ret < 0)
@ -119,7 +115,6 @@ int close(int fd)
}
}
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Close the driver or mountpoint. NOTES: (1) there is no
* exclusion mechanism here, the driver or mountpoint must be
* able to handle concurrent operations internally, (2) The driver
@ -142,8 +137,6 @@ int close(int fd)
leave_cancellation_point();
return OK;
#endif
errout:
set_errno(errcode);
leave_cancellation_point();

View file

@ -65,7 +65,6 @@ int dup(int fd)
/* Check the range of the descriptor to see if we got a file or a socket
* descriptor. */
#if CONFIG_NFILE_DESCRIPTORS > 0
if ((unsigned int)fd < CONFIG_NFILE_DESCRIPTORS)
{
/* Its a valid file descriptor.. dup the file descriptor using any
@ -76,12 +75,11 @@ int dup(int fd)
ret = fs_dupfd(fd, 0);
}
else
#endif
{
/* Not a valid file descriptor. Did we get a valid socket descriptor? */
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS))
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))
{
/* Yes.. dup the socket descriptor. The errno value is not set. */

View file

@ -1,7 +1,8 @@
/****************************************************************************
* fs/vfs/fs_dup2.c
*
* Copyright (C) 2007-2009, 2011, 2013, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2011, 2013, 2017 Gregory Nutt. All rights
* reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -50,7 +51,7 @@
* performed.
*/
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
/****************************************************************************
* Public Functions
@ -77,7 +78,7 @@ int dup2(int fd1, int fd2)
/* Not a valid file descriptor. Did we get a valid socket descriptor? */
if ((unsigned int)fd1 < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS))
if ((unsigned int)fd1 < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))
{
/* Yes.. dup the socket descriptor. The errno value is not set. */
@ -110,5 +111,5 @@ int dup2(int fd1, int fd2)
}
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 ... */
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS > 0 */

View file

@ -1,7 +1,8 @@
/****************************************************************************
* fs/vfs/fs_dupfd.c
*
* Copyright (C) 2007-2009, 2011-2014, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2011-2014, 2017 Gregory Nutt. All rights
* reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -47,8 +48,6 @@
#include "inode/inode.h"
#if CONFIG_NFILE_DESCRIPTORS > 0
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -147,5 +146,3 @@ errout:
return ERROR;
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */

View file

@ -46,8 +46,6 @@
#include "inode/inode.h"
#if CONFIG_NFILE_DESCRIPTORS > 0
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -133,5 +131,3 @@ errout:
return ERROR;
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */

View file

@ -75,7 +75,6 @@
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_vfcntl(FAR struct file *filep, int cmd, va_list ap)
{
int ret = -EINVAL;
@ -212,7 +211,6 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap)
return ret;
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
/****************************************************************************
* Name: file_fcntl
@ -233,7 +231,6 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap)
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_fcntl(FAR struct file *filep, int cmd, ...)
{
va_list ap;
@ -252,7 +249,6 @@ int file_fcntl(FAR struct file *filep, int cmd, ...)
va_end(ap);
return ret;
}
#endif
/****************************************************************************
* Name: fcntl
@ -289,7 +285,6 @@ int fcntl(int fd, int cmd, ...)
/* Did we get a valid file descriptor? */
#if CONFIG_NFILE_DESCRIPTORS > 0
if ((unsigned int)fd < CONFIG_NFILE_DESCRIPTORS)
{
/* Get the file structure corresponding to the file descriptor. */
@ -307,12 +302,11 @@ int fcntl(int fd, int cmd, ...)
}
}
else
#endif
{
/* No... check for operations on a socket descriptor */
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS))
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))
{
/* Yes.. defer socket descriptor operations to net_vfcntl(). The
* errno is not set on failures.

View file

@ -62,7 +62,6 @@
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
static inline int fs_checkfd(FAR struct tcb_s *tcb, int fd, int oflags)
{
FAR struct file *filep;
@ -110,7 +109,6 @@ static inline int fs_checkfd(FAR struct tcb_s *tcb, int fd, int oflags)
return OK;
}
#endif
/****************************************************************************
* Public Functions
@ -159,9 +157,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
* lie in a different range.
*/
#if CONFIG_NFILE_DESCRIPTORS > 0
if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS)
#endif
{
/* No.. If networking is enabled then this might be a socket
* descriptor.
@ -177,14 +173,14 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
#endif
}
/* The descriptor is in a valid range to file descriptor... perform some more checks */
/* The descriptor is in a valid range to file descriptor... perform some
* more checks.
*/
#if CONFIG_NFILE_DESCRIPTORS > 0
else
{
ret = fs_checkfd(tcb, fd, oflags);
}
#endif
/* Do we have a good descriptor of some sort? */

View file

@ -75,7 +75,6 @@
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_ioctl(FAR struct file *filep, int req, unsigned long arg)
{
FAR struct inode *inode;
@ -101,7 +100,6 @@ int file_ioctl(FAR struct file *filep, int req, unsigned long arg)
return (int)inode->u.i_ops->ioctl(filep, req, arg);
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
/****************************************************************************
* Name: ioctl/fs_ioctl
@ -139,19 +137,17 @@ int ioctl(int fd, int req, unsigned long arg)
#endif
{
int errcode;
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct file *filep;
int ret;
/* Did we get a valid file descriptor? */
if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS)
#endif
{
/* Perform the socket ioctl */
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS))
if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))
{
ret = netdev_ioctl(fd, req, arg);
if (ret < 0)
@ -170,7 +166,6 @@ int ioctl(int fd, int req, unsigned long arg)
}
}
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Get the file structure corresponding to the file descriptor. */
ret = fs_getfilep(fd, &filep);
@ -194,9 +189,6 @@ int ioctl(int fd, int req, unsigned long arg)
}
return ret;
#else
errcode = ENOTTY;
#endif
errout:
set_errno(errcode);

View file

@ -47,8 +47,6 @@
#include "inode/inode.h"
#if CONFIG_NFILE_DESCRIPTORS > 0
/****************************************************************************
* Public Functions
****************************************************************************/
@ -194,4 +192,3 @@ errout:
return (off_t)ERROR;
}
#endif

View file

@ -98,7 +98,6 @@ static int poll_semtake(FAR sem_t *sem)
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
static int poll_fdsetup(int fd, FAR struct pollfd *fds, bool setup)
{
/* Check for a valid file descriptor */
@ -121,7 +120,6 @@ static int poll_fdsetup(int fd, FAR struct pollfd *fds, bool setup)
return fdesc_poll(fd, fds, setup);
}
#endif
/****************************************************************************
* Name: poll_setup
@ -131,7 +129,6 @@ static int poll_fdsetup(int fd, FAR struct pollfd *fds, bool setup)
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, sem_t *sem)
{
unsigned int i;
@ -227,7 +224,6 @@ static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, sem_t *sem)
return OK;
}
#endif
/****************************************************************************
* Name: poll_teardown
@ -238,9 +234,8 @@ static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, sem_t *sem)
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds, int *count,
int ret)
static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds,
FAR int *count, int ret)
{
unsigned int i;
int status = OK;
@ -299,7 +294,6 @@ static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds, int *count,
return ret;
}
#endif
/****************************************************************************
* Public Functions
@ -324,7 +318,6 @@ static inline int poll_teardown(FAR struct pollfd *fds, nfds_t nfds, int *count,
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
{
FAR struct inode *inode;
@ -370,7 +363,6 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
return ret;
}
#endif
/****************************************************************************
* Name: fdesc_poll
@ -391,7 +383,6 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int fdesc_poll(int fd, FAR struct pollfd *fds, bool setup)
{
FAR struct file *filep;
@ -411,7 +402,6 @@ int fdesc_poll(int fd, FAR struct pollfd *fds, bool setup)
return file_poll(filep, fds, setup);
}
#endif
/****************************************************************************
* Name: poll

View file

@ -140,9 +140,7 @@ ssize_t nx_read(int fd, FAR void *buf, size_t nbytes)
{
/* Did we get a valid file descriptor? */
#if CONFIG_NFILE_DESCRIPTORS > 0
if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS)
#endif
{
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
/* No.. If networking is enabled, read() is the same as recv() with
@ -156,8 +154,6 @@ ssize_t nx_read(int fd, FAR void *buf, size_t nbytes)
return -EBADF;
#endif
}
#if CONFIG_NFILE_DESCRIPTORS > 0
else
{
FAR struct file *filep;
@ -178,11 +174,6 @@ ssize_t nx_read(int fd, FAR void *buf, size_t nbytes)
return file_read(filep, buf, nbytes);
}
#else
/* I don't think we can get here */
return -ENOSYS;
#endif
}
/****************************************************************************

View file

@ -50,7 +50,7 @@
#include <nuttx/sched.h>
#include <nuttx/net/net.h>
#if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NET_SENDFILE
#ifdef CONFIG_NET_SENDFILE
/****************************************************************************
* Public Functions
@ -148,4 +148,5 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count)
return lib_sendfile(outfd, infd, offset, count);
}
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NET_SENDFILE */
#endif /* CONFIG_NET_SENDFILE */

View file

@ -137,9 +137,7 @@ ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes)
ssize_t nx_write(int fd, FAR const void *buf, size_t nbytes)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct file *filep;
#endif
ssize_t ret;
if (buf == NULL)
@ -149,9 +147,7 @@ ssize_t nx_write(int fd, FAR const void *buf, size_t nbytes)
/* Did we get a valid file descriptor? */
#if CONFIG_NFILE_DESCRIPTORS > 0
if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS)
#endif
{
#if defined(CONFIG_NET_TCP) && CONFIG_NSOCKET_DESCRIPTORS > 0
/* Write to a socket descriptor is equivalent to send with flags == 0. */
@ -161,8 +157,6 @@ ssize_t nx_write(int fd, FAR const void *buf, size_t nbytes)
ret = -EBADF;
#endif
}
#if CONFIG_NFILE_DESCRIPTORS > 0
else
{
/* The descriptor is in the right range to be a file descriptor..
@ -180,7 +174,6 @@ ssize_t nx_write(int fd, FAR const void *buf, size_t nbytes)
ret = file_write(filep, buf, nbytes);
}
}
#endif
return ret;
}

View file

@ -425,13 +425,11 @@ struct file
/* This defines a list of files indexed by the file descriptor */
#if CONFIG_NFILE_DESCRIPTORS > 0
struct filelist
{
sem_t fl_sem; /* Manage access to the file list */
struct file fl_files[CONFIG_NFILE_DESCRIPTORS];
};
#endif
/* The following structure defines the list of files used for standard C I/O.
* Note that NuttX can support the standard C APIs with or without buffering
@ -703,9 +701,7 @@ int inode_checkflags(FAR struct inode *inode, int oflags);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
void files_initlist(FAR struct filelist *list);
#endif
/****************************************************************************
* Name: files_releaselist
@ -715,9 +711,7 @@ void files_initlist(FAR struct filelist *list);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
void files_releaselist(FAR struct filelist *list);
#endif
/****************************************************************************
* Name: file_dup2
@ -736,9 +730,7 @@ void files_releaselist(FAR struct filelist *list);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_dup2(FAR struct file *filep1, FAR struct file *filep2);
#endif
/****************************************************************************
* Name: fs_dupfd OR dup
@ -760,9 +752,7 @@ int file_dup2(FAR struct file *filep1, FAR struct file *filep2);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int fs_dupfd(int fd, int minfd);
#endif
/****************************************************************************
* Name: file_dup
@ -799,13 +789,11 @@ int file_dup(FAR struct file *filep, int minfd);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
int fs_dupfd2(int fd1, int fd2);
#else
# define fs_dupfd2(fd1, fd2) dup2(fd1, fd2)
#endif
#endif
/****************************************************************************
* Name: file_open
@ -854,9 +842,7 @@ int file_open(FAR struct file *filep, FAR const char *path, int oflags, ...);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_detach(int fd, FAR struct file *filep);
#endif
/****************************************************************************
* Name: file_close
@ -900,10 +886,8 @@ int file_close(FAR struct file *filep);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int open_blockdriver(FAR const char *pathname, int mountflags,
FAR struct inode **ppinode);
#endif
/****************************************************************************
* Name: close_blockdriver
@ -922,9 +906,7 @@ int open_blockdriver(FAR const char *pathname, int mountflags,
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int close_blockdriver(FAR struct inode *inode);
#endif
/****************************************************************************
* Name: fs_ioctl
@ -1016,9 +998,7 @@ ssize_t lib_sendfile(int outfd, int infd, off_t *offset, size_t count);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int fs_getfilep(int fd, FAR struct file **filep);
#endif
/****************************************************************************
* Name: nx_open and nx_vopen
@ -1065,9 +1045,7 @@ int nx_open(FAR const char *path, int oflags, ...);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes);
#endif
/****************************************************************************
* Name: nx_read
@ -1102,9 +1080,7 @@ ssize_t nx_read(int fd, FAR void *buf, size_t nbytes);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes);
#endif
/****************************************************************************
* Name: nx_write
@ -1143,10 +1119,8 @@ ssize_t nx_write(int fd, FAR const void *buf, size_t nbytes);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
ssize_t file_pread(FAR struct file *filep, FAR void *buf, size_t nbytes,
off_t offset);
#endif
/****************************************************************************
* Name: file_pwrite
@ -1158,10 +1132,8 @@ ssize_t file_pread(FAR struct file *filep, FAR void *buf, size_t nbytes,
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
ssize_t file_pwrite(FAR struct file *filep, FAR const void *buf,
size_t nbytes, off_t offset);
#endif
/****************************************************************************
* Name: file_seek
@ -1173,9 +1145,7 @@ ssize_t file_pwrite(FAR struct file *filep, FAR const void *buf,
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
off_t file_seek(FAR struct file *filep, off_t offset, int whence);
#endif
/****************************************************************************
* Name: file_fsync
@ -1187,7 +1157,7 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)
#ifndef CONFIG_DISABLE_MOUNTPOINT
int file_fsync(FAR struct file *filep);
#endif
@ -1201,7 +1171,7 @@ int file_fsync(FAR struct file *filep);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)
#ifndef CONFIG_DISABLE_MOUNTPOINT
int file_truncate(FAR struct file *filep, off_t length);
#endif
@ -1223,9 +1193,7 @@ int file_truncate(FAR struct file *filep, off_t length);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_ioctl(FAR struct file *filep, int req, unsigned long arg);
#endif
/****************************************************************************
* Name: file_vfcntl
@ -1246,9 +1214,7 @@ int file_ioctl(FAR struct file *filep, int req, unsigned long arg);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_vfcntl(FAR struct file *filep, int cmd, va_list ap);
#endif
/****************************************************************************
* Name: file_fcntl
@ -1269,9 +1235,7 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_fcntl(FAR struct file *filep, int cmd, ...);
#endif
/****************************************************************************
* Name: file_poll
@ -1292,9 +1256,7 @@ int file_fcntl(FAR struct file *filep, int cmd, ...);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup);
#endif
/****************************************************************************
* Name: file_fstat
@ -1319,9 +1281,7 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int file_fstat(FAR struct file *filep, FAR struct stat *buf);
#endif
/****************************************************************************
* Name: fdesc_poll
@ -1341,9 +1301,7 @@ int file_fstat(FAR struct file *filep, FAR struct stat *buf);
*
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0
int fdesc_poll(int fd, FAR struct pollfd *fds, bool setup);
#endif
#undef EXTERN
#if defined(__cplusplus)

View file

@ -97,11 +97,7 @@
* socket descriptors
*/
#ifdef CONFIG_NFILE_DESCRIPTORS
# define __SOCKFD_OFFSET CONFIG_NFILE_DESCRIPTORS
#else
# define __SOCKFD_OFFSET 0
#endif
#define __SOCKFD_OFFSET CONFIG_NFILE_DESCRIPTORS
/* Capabilities of a socket */

View file

@ -66,7 +66,6 @@
/* Configuration ****************************************************************/
/* Task groups currently only supported for retention of child status */
#undef HAVE_TASK_GROUP
#undef HAVE_GROUP_MEMBERS
/* We need a group an group members if we are supporting the parent/child
@ -74,41 +73,7 @@
*/
#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS)
# define HAVE_TASK_GROUP 1
# define HAVE_GROUP_MEMBERS 1
/* We need a group (but not members) if any other resources are shared within
* a task group. NOTE: that we essentially always need a task group and that
* managing this definition adds a lot of overhead just to handle a corner-
* case very minimal system!
*/
#else
# if !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SCHED_HAVE_PARENT)
# define HAVE_TASK_GROUP 1 /* pthreads with parent*/
# elif !defined(CONFIG_DISABLE_ENVIRON)
# define HAVE_TASK_GROUP 1 /* Environment variables */
# elif !defined(CONFIG_DISABLE_SIGNALS)
# define HAVE_TASK_GROUP 1 /* Signals */
# elif defined(CONFIG_SCHED_ATEXIT)
# define HAVE_TASK_GROUP 1 /* Group atexit() function */
# elif defined(CONFIG_SCHED_ONEXIT)
# define HAVE_TASK_GROUP 1 /* Group on_exit() function */
# elif defined(CONFIG_SCHED_WAITPID)
# define HAVE_TASK_GROUP 1 /* Group waitpid() function */
# elif CONFIG_NFILE_DESCRIPTORS > 0
# define HAVE_TASK_GROUP 1 /* File descriptors */
# elif CONFIG_NFILE_STREAMS > 0
# define HAVE_TASK_GROUP 1 /* Standard C buffered I/O */
# elif CONFIG_NSOCKET_DESCRIPTORS > 0
# define HAVE_TASK_GROUP 1 /* Sockets */
# elif !defined(CONFIG_DISABLE_MQUEUE)
# define HAVE_TASK_GROUP 1 /* Message queues */
# elif defined(CONFIG_ARCH_ADDRENV)
# define HAVE_TASK_GROUP 1 /* Address environment */
# elif defined(CONFIG_MM_SHM)
# define HAVE_TASK_GROUP 1 /* Shared memory */
# endif
#endif
/* In any event, we don't need group members if support for pthreads is disabled */
@ -440,8 +405,6 @@ struct dspace_s
* is free.
*/
#ifdef HAVE_TASK_GROUP
#ifndef CONFIG_DISABLE_PTHREAD
struct join_s; /* Forward reference */
/* Defined in sched/pthread/pthread.h */
@ -562,11 +525,9 @@ struct task_group_s
* life of the PIC data is managed.
*/
#if CONFIG_NFILE_DESCRIPTORS > 0
/* File descriptors ***********************************************************/
struct filelist tg_filelist; /* Maps file descriptor to file */
#endif
#if CONFIG_NFILE_STREAMS > 0
/* FILE streams ***************************************************************/
@ -607,7 +568,6 @@ struct task_group_s
struct group_shm_s tg_shm; /* Task shared memory logic */
#endif
};
#endif
/* struct tcb_s ******************************************************************/
/* This is the common part of the task control block (TCB). The TCB is the heart
@ -626,9 +586,7 @@ struct tcb_s
/* Task Group *****************************************************************/
#ifdef HAVE_TASK_GROUP
FAR struct task_group_s *group; /* Pointer to shared task group data */
#endif
/* Task Management Fields *****************************************************/
@ -863,12 +821,10 @@ FAR struct tcb_s *sched_gettcb(pid_t pid);
* currently executing task.
*/
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct filelist *sched_getfiles(void);
#if CONFIG_NFILE_STREAMS > 0
FAR struct streamlist *sched_getstreams(void);
#endif /* CONFIG_NFILE_STREAMS */
#endif /* CONFIG_NFILE_DESCRIPTORS */
#if CONFIG_NSOCKET_DESCRIPTORS > 0
FAR struct socketlist *sched_getsockets(void);

View file

@ -46,8 +46,6 @@
#include <signal.h>
#include <time.h>
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -133,5 +131,4 @@ int pselect(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
}
#endif
#endif /* CONFIG_NFILE_DESCRIPTORS || CONFIG_NSOCKET_DESCRIPTORS */
#endif /* __INCLUDE_SYS_SELECT_H */

View file

@ -275,54 +275,56 @@
# define CONFIG_NSOCKET_DESCRIPTORS 0
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
# define SYS_close (__SYS_descriptors + 0)
# ifdef CONFIG_LIBC_IOCTL_VARIADIC
# define SYS_fs_ioctl (__SYS_descriptors + 1)
#define SYS_close (__SYS_descriptors + 0)
#ifdef CONFIG_LIBC_IOCTL_VARIADIC
# define SYS_fs_ioctl (__SYS_descriptors + 1)
#else
# define SYS_ioctl (__SYS_descriptors + 1)
#endif
#define SYS_read (__SYS_descriptors + 2)
#define SYS_write (__SYS_descriptors + 3)
#define SYS_pread (__SYS_descriptors + 4)
#define SYS_pwrite (__SYS_descriptors + 5)
#ifdef CONFIG_FS_AIO
# define SYS_aio_read (__SYS_descriptors + 6)
# define SYS_aio_write (__SYS_descriptors + 7)
# define SYS_aio_fsync (__SYS_descriptors + 8)
# define SYS_aio_cancel (__SYS_descriptors + 9)
# define __SYS_poll (__SYS_descriptors + 10)
#else
# define __SYS_poll (__SYS_descriptors + 6)
#endif
#ifndef CONFIG_DISABLE_POLL
# define SYS_poll __SYS_poll
# define SYS_select (__SYS_poll + 1)
# ifndef CONFIG_DISABLE_SIGNALS
# define SYS_ppoll (__SYS_poll + 2)
# define SYS_pselect (__SYS_poll + 3)
# define __SYS_ifindex (__SYS_poll + 4)
# else
# define SYS_ioctl (__SYS_descriptors + 1)
# endif
# define SYS_read (__SYS_descriptors + 2)
# define SYS_write (__SYS_descriptors + 3)
# define SYS_pread (__SYS_descriptors + 4)
# define SYS_pwrite (__SYS_descriptors + 5)
# ifdef CONFIG_FS_AIO
# define SYS_aio_read (__SYS_descriptors + 6)
# define SYS_aio_write (__SYS_descriptors + 7)
# define SYS_aio_fsync (__SYS_descriptors + 8)
# define SYS_aio_cancel (__SYS_descriptors + 9)
# define __SYS_poll (__SYS_descriptors + 10)
# else
# define __SYS_poll (__SYS_descriptors + 6)
# endif
# ifndef CONFIG_DISABLE_POLL
# define SYS_poll __SYS_poll
# define SYS_select (__SYS_poll + 1)
# ifndef CONFIG_DISABLE_SIGNALS
# define SYS_ppoll (__SYS_poll + 2)
# define SYS_pselect (__SYS_poll + 3)
# define __SYS_ifindex (__SYS_poll + 4)
# else
# define __SYS_ifindex (__SYS_poll + 2)
# endif
# else
# define __SYS_ifindex __SYS_poll
# endif
# ifdef CONFIG_NETDEV_IFINDEX
# define SYS_if_indextoname __SYS_ifindex
# define SYS_if_nametoindex (__SYS_ifindex + 1)
# define __SYS_termios (__SYS_ifindex + 2)
# else
# define __SYS_termios __SYS_ifindex
# endif
# ifdef CONFIG_SERIAL_TERMIOS
# define SYS_tcdrain __SYS_termios
# define __SYS_boardctl (__SYS_termios + 1)
# else
# define __SYS_boardctl __SYS_termios
# define __SYS_ifindex (__SYS_poll + 2)
# endif
#else
# define __SYS_boardctl __SYS_descriptors
# define __SYS_ifindex __SYS_poll
#endif
#ifdef CONFIG_NETDEV_IFINDEX
# define SYS_if_indextoname __SYS_ifindex
# define SYS_if_nametoindex (__SYS_ifindex + 1)
# define __SYS_termios (__SYS_ifindex + 2)
#else
# define __SYS_termios __SYS_ifindex
#endif
#ifdef CONFIG_SERIAL_TERMIOS
# define SYS_tcdrain __SYS_termios
# define __SYS_boardctl (__SYS_termios + 1)
#else
# define __SYS_boardctl __SYS_termios
#endif
/* Board support */
@ -336,79 +338,74 @@
/* The following are defined if file descriptors are enabled */
#if CONFIG_NFILE_DESCRIPTORS > 0
# define SYS_closedir (__SYS_filedesc + 0)
# define SYS_dup (__SYS_filedesc + 1)
# define SYS_dup2 (__SYS_filedesc + 2)
# define SYS_fcntl (__SYS_filedesc + 3)
# define SYS_lseek (__SYS_filedesc + 4)
# define SYS_mmap (__SYS_filedesc + 5)
# define SYS_open (__SYS_filedesc + 6)
# define SYS_opendir (__SYS_filedesc + 7)
# define SYS_readdir (__SYS_filedesc + 8)
# define SYS_rewinddir (__SYS_filedesc + 9)
# define SYS_seekdir (__SYS_filedesc + 10)
# define SYS_stat (__SYS_filedesc + 11)
# define SYS_fstat (__SYS_filedesc + 12)
# define SYS_statfs (__SYS_filedesc + 13)
# define SYS_fstatfs (__SYS_filedesc + 14)
# define SYS_telldir (__SYS_filedesc + 15)
# if defined(CONFIG_PSEUDOFS_SOFTLINKS)
# define SYS_link (__SYS_filedesc + 16)
# define SYS_readlink (__SYS_filedesc + 17)
# define __SYS_pipes (__SYS_filedesc + 18)
# else
# define __SYS_pipes (__SYS_filedesc + 16)
# endif
# if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
# define SYS_pipe2 (__SYS_pipes + 0)
# define __SYS_mkfifo2 (__SYS_pipes + 1)
# else
# define __SYS_mkfifo2 (__SYS_pipes + 0)
# endif
# if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0
# define SYS_mkfifo2 (__SYS_mkfifo2 + 0)
# define __SYS_fs_fdopen (__SYS_mkfifo2 + 1)
# else
# define __SYS_fs_fdopen (__SYS_mkfifo2 + 0)
# endif
# if CONFIG_NFILE_STREAMS > 0
# define SYS_fs_fdopen (__SYS_fs_fdopen + 0)
# define SYS_sched_getstreams (__SYS_fs_fdopen + 1)
# define __SYS_sendfile (__SYS_fs_fdopen + 2)
# else
# define __SYS_sendfile (__SYS_fs_fdopen + 0)
# endif
# if defined(CONFIG_NET_SENDFILE)
# define SYS_sendfile, __SYS_sendfile
# define __SYS_mountpoint (__SYS_sendfile + 1)
# else
# define __SYS_mountpoint __SYS_sendfile
# endif
# if !defined(CONFIG_DISABLE_MOUNTPOINT)
# if defined(CONFIG_FS_READABLE)
# define SYS_mount (__SYS_mountpoint + 0)
# endif
# define SYS_fsync (__SYS_mountpoint + 1)
# define SYS_ftruncate (__SYS_mountpoint + 2)
# define SYS_mkdir (__SYS_mountpoint + 3)
# define SYS_rename (__SYS_mountpoint + 4)
# define SYS_rmdir (__SYS_mountpoint + 5)
# define SYS_umount2 (__SYS_mountpoint + 6)
# define SYS_unlink (__SYS_mountpoint + 7)
# define __SYS_shm (__SYS_mountpoint + 8)
# else
# define __SYS_shm __SYS_mountpoint
# endif
#define SYS_closedir (__SYS_filedesc + 0)
#define SYS_dup (__SYS_filedesc + 1)
#define SYS_dup2 (__SYS_filedesc + 2)
#define SYS_fcntl (__SYS_filedesc + 3)
#define SYS_lseek (__SYS_filedesc + 4)
#define SYS_mmap (__SYS_filedesc + 5)
#define SYS_open (__SYS_filedesc + 6)
#define SYS_opendir (__SYS_filedesc + 7)
#define SYS_readdir (__SYS_filedesc + 8)
#define SYS_rewinddir (__SYS_filedesc + 9)
#define SYS_seekdir (__SYS_filedesc + 10)
#define SYS_stat (__SYS_filedesc + 11)
#define SYS_fstat (__SYS_filedesc + 12)
#define SYS_statfs (__SYS_filedesc + 13)
#define SYS_fstatfs (__SYS_filedesc + 14)
#define SYS_telldir (__SYS_filedesc + 15)
#if defined(CONFIG_PSEUDOFS_SOFTLINKS)
# define SYS_link (__SYS_filedesc + 16)
# define SYS_readlink (__SYS_filedesc + 17)
# define __SYS_pipes (__SYS_filedesc + 18)
#else
# define __SYS_shm __SYS_filedesc
# define __SYS_pipes (__SYS_filedesc + 16)
#endif
#if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
# define SYS_pipe2 (__SYS_pipes + 0)
# define __SYS_mkfifo2 (__SYS_pipes + 1)
#else
# define __SYS_mkfifo2 (__SYS_pipes + 0)
#endif
#if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0
# define SYS_mkfifo2 (__SYS_mkfifo2 + 0)
# define __SYS_fs_fdopen (__SYS_mkfifo2 + 1)
#else
# define __SYS_fs_fdopen (__SYS_mkfifo2 + 0)
#endif
#if CONFIG_NFILE_STREAMS > 0
# define SYS_fs_fdopen (__SYS_fs_fdopen + 0)
# define SYS_sched_getstreams (__SYS_fs_fdopen + 1)
# define __SYS_sendfile (__SYS_fs_fdopen + 2)
#else
# define __SYS_sendfile (__SYS_fs_fdopen + 0)
#endif
#if defined(CONFIG_NET_SENDFILE)
# define SYS_sendfile, __SYS_sendfile
# define __SYS_mountpoint (__SYS_sendfile + 1)
#else
# define __SYS_mountpoint __SYS_sendfile
#endif
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
#if defined(CONFIG_FS_READABLE)
# define SYS_mount (__SYS_mountpoint + 0)
#endif
# define SYS_fsync (__SYS_mountpoint + 1)
# define SYS_ftruncate (__SYS_mountpoint + 2)
# define SYS_mkdir (__SYS_mountpoint + 3)
# define SYS_rename (__SYS_mountpoint + 4)
# define SYS_rmdir (__SYS_mountpoint + 5)
# define SYS_umount2 (__SYS_mountpoint + 6)
# define SYS_unlink (__SYS_mountpoint + 7)
# define __SYS_shm (__SYS_mountpoint + 8)
#else
# define __SYS_shm __SYS_mountpoint
#endif
/* Shared memory interfaces */

View file

@ -33,8 +33,6 @@
#
############################################################################
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
# Add the dirent C files to the build
CSRCS += lib_readdirr.c lib_telldir.c
@ -44,5 +42,3 @@ CSRCS += lib_readdirr.c lib_telldir.c
DEPPATH += --dep-path dirent
VPATH += :dirent
endif

View file

@ -13,9 +13,9 @@
"b16sin","fixedmath.h","","b16_t","b16_t"
"b16sqr","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","b16_t","b16_t"
"basename","libgen.h","","FAR char","FAR char *"
"cfgetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","speed_t","FAR const struct termios *"
"cfsetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","FAR struct termios *","speed_t"
"chdir","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"cfgetspeed","termios.h","defined(CONFIG_SERIAL_TERMIOS)","speed_t","FAR const struct termios *"
"cfsetspeed","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","FAR struct termios *","speed_t"
"chdir","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"clock","time.h","","clock_t"
"crc32","crc32.h","","uint32_t","FAR const uint8_t *","size_t"
"crc32part","crc32.h","","uint32_t","FAR const uint8_t *","size_t","uint32_t"
@ -29,30 +29,30 @@
"dq_remlast","queue.h","","FAR dq_entry_t","dq_queue_t *"
"_err","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR)","int","FAR const char *","..."
"ether_ntoa","netinet/ether.h","","FAR char","FAR const struct ether_addr *"
"fclose","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fdopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *"
"fflush","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fclose","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fdopen","stdio.h","CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *"
"fflush","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"ffs","strings.h","","int","int"
"fgetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fgetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
"fgets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *","int","FAR FILE *"
"fgetc","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
"fgetpos","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
"fgets","stdio.h","CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *","int","FAR FILE *"
"fileno","stdio.h","","int","FAR FILE *"
"fopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","FAR const char *","FAR const char *"
"fprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","..."
"fputc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int c","FAR FILE *"
"fputs","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","FAR FILE *"
"fread","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR void *","size_t","size_t","FAR FILE *"
"fseek","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","long int","int"
"fsetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
"ftell","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","long","FAR FILE *"
"fwrite","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR const void *","size_t","size_t","FAR FILE *"
"getcwd","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","FAR char","FAR char *","size_t"
"fopen","stdio.h","CONFIG_NFILE_STREAMS > 0","FAR FILE","FAR const char *","FAR const char *"
"fprintf","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","..."
"fputc","stdio.h","CONFIG_NFILE_STREAMS > 0","int","int c","FAR FILE *"
"fputs","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR const char *","FAR FILE *"
"fread","stdio.h","CONFIG_NFILE_STREAMS > 0","size_t","FAR void *","size_t","size_t","FAR FILE *"
"fseek","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","long int","int"
"fsetpos","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
"ftell","stdio.h","CONFIG_NFILE_STREAMS > 0","long","FAR FILE *"
"fwrite","stdio.h","CONFIG_NFILE_STREAMS > 0","size_t","FAR const void *","size_t","size_t","FAR FILE *"
"getcwd","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char","FAR char *","size_t"
"gethostname","unistd.h","","int","FAR char*","size_t"
"getopt","unistd.h","","int","int","FAR char *const[]","FAR const char *"
"getoptargp","unistd.h","","FAR char *"
"getoptindp","unistd.h","","int"
"getoptoptp","unistd.h","","int"
"gets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *"
"gets","stdio.h","CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *"
"gmtime","time.h","","struct tm","FAR const time_t *"
"gmtime_r","time.h","","FAR struct tm","FAR const time_t *","FAR struct tm *"
"htonl","arpa/inet.h","","uint32_t","uint32_t"
@ -89,12 +89,12 @@
"memcpy","string.h","","FAR void","FAR void *","FAR const void *","size_t"
"memmove","string.h","","FAR void","FAR void *","FAR const void *","size_t"
"memset","string.h","","FAR void","FAR void *","int c","size_t"
"mkfifo","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR const char*","mode_t"
"mkfifo","sys/stat.h","","int","FAR const char*","mode_t"
"mktime","time.h","","time_t","FAR const struct tm *"
"ntohl","arpa/inet.h","","uint32_t","uint32_t"
"ntohs","arpa/inet.h","","uint16_t","uint16_t"
"perror","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","void","FAR const char *"
"pipe","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int [2]|int*"
"perror","stdio.h","CONFIG_NFILE_STREAMS > 0","void","FAR const char *"
"pipe","unistd.h","","int","int [2]|int*"
"printf","stdio.h","","int","FAR const char *","..."
"pthread_attr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
"pthread_attr_getinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *"
@ -125,15 +125,15 @@
"pthread_mutexattr_settype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_PTHREAD_MUTEX_TYPES)","int","pthread_mutexattr_t *","int"
"pthread_once","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_once_t*","CODE void (*)(void)"
"pthread_yield","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","void"
"puts","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *"
"puts","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR const char *"
"qsort","stdlib.h","","void","void *","size_t","size_t","int(*)(const void *","FAR const void *)"
"rand","stdlib.h","","int"
"readdir_r","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR DIR *","FAR struct dirent *","FAR struct dirent **"
"readdir_r","dirent.h","","int","FAR DIR *","FAR struct dirent *","FAR struct dirent **"
"sched_get_priority_max","sched.h","","int","int"
"sched_get_priority_min","sched.h","","int","int"
"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
"sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t"
"sendfile","sys/sendfile.h","","ssize_t","int","int","off_t","size_t"
"setlocale","local.h","","FAR char *s","int","FAR const char *s"
"setlogmask","syslog.h","","int","int"
"sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
@ -187,21 +187,21 @@
"swab","unistd.h","","void","int","FAR const void *","FAR void *","ssize_t"
"swprintf","wchar.h","defined(CONFIG_LIBC_WCHAR)","int","FAR wchar_t *","size_t","FAR const wchar_t *","..."
"syslog","syslog.h","","int","int","FAR const char *","..."
"tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
"tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
"tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
"telldir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","FAR DIR *"
"tcflush","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
"tcgetattr","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
"tcsetattr","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
"telldir","dirent.h","","off_t","FAR DIR *"
"time","time.h","","time_t","time_t *"
"towlower","wchar.h","defined(CONFIG_LIBC_WCHAR)","wint_t","wint_t"
"towupper","wchar.h","defined(CONFIG_LIBC_WCHAR)","wint_t","wint_t"
"ub16divub16","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t","ub16_t"
"ub16mulub16","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t","ub16_t"
"ub16sqr","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t"
"ungetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *"
"ungetc","stdio.h","CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *"
"usleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","int","int","FAR FILE *"
"_info","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO)","int","FAR const char *","..."
"vfprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","va_list"
"vprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list"
"vfprintf","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","va_list"
"vprintf","stdio.h","CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list"
"vsnprintf","stdio.h","","int","FAR char *","size_t","FAR const char *","va_list"
"vsprintf","stdio.h","","int","FAR char *","FAR const char *","va_list"
"vsscanf","stdio.h","","int","FAR char *","FAR const char *","va_list"

Can't render this file because it has a wrong number of fields in line 2.

View file

@ -50,8 +50,6 @@ CSRCS += lib_uadd32x64.c lib_uadd64.c lib_usub64x32.c lib_usub64.c
# Add C files that depend on file OR socket descriptors
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
CSRCS += lib_sendfile.c
ifneq ($(CONFIG_NFILE_STREAMS),0)
@ -66,22 +64,6 @@ ifeq ($(CONFIG_PIPES),y)
CSRCS += lib_mkfifo.c
endif
else # CONFIG_NFILE_DESCRIPTORS > 0
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
CSRCS += lib_sendfile.c
ifneq ($(CONFIG_NFILE_STREAMS),0)
CSRCS += lib_streamsem.c
endif
ifeq ($(CONFIG_LIBC_IOCTL_VARIADIC),y)
CSRCS += lib_ioctl.c
endif
endif # CONFIG_NSOCKET_DESCRIPTORS > 0
endif # CONFIG_NFILE_DESCRIPTORS > 0
# Add the miscellaneous C files to the build
CSRCS += lib_crc64.c lib_crc32.c lib_crc16.c lib_crc8.c lib_crc8ccitt.c

Some files were not shown because too many files have changed in this diff Show more