Extend the NSH mount command so that it will enumerate mountpoints if no arguments are provided

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5006 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-08-03 23:47:32 +00:00
parent 74d65d52dd
commit 026caf9e54

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1>
<p>Last Updated: June 15, 2012</p> <p>Last Updated: August 3, 2012</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -1439,8 +1439,12 @@ mount -t &lt;fstype&gt; &lt;block-device&gt; <code>&lt;dir-path&gt;</code>
</pre></ul> </pre></ul>
<p> <p>
<b>Synopsis</b>. <b>Synopsis</b>.
The 'm ount' command mounts a file system in the NuttX psuedo The <code>mount</code> command performs one of two different operations.
filesystem. 'mount' performs a three way associating, binding: If no paramters are provided on the command line after the <code>mount</code> command, then the <code>mount</code> command will enumerate all of the current mountpoints on the console.
</p>
<p>
If the mount parameters are provied on the command after the <code>mount</code> command, then the <code>mount</code> command will mount a file system in the NuttX psuedo-file system.
<code>mount</code>' performs a three way association, binding:
</p> </p>
<ol> <ol>
<li><b>File system.</b> <li><b>File system.</b>
@ -1469,7 +1473,8 @@ mount -t &lt;fstype&gt; &lt;block-device&gt; <code>&lt;dir-path&gt;</code>
<a href="NuttxUserGuide.html#FileSystemOverview"><i>pseudo</i> filesystem</a>, <a href="NuttxUserGuide.html#FileSystemOverview"><i>pseudo</i> filesystem</a>,
it may be access in the same way as other objects in thefile system. it may be access in the same way as other objects in thefile system.
</p> </p>
<p><b>Example</b></p> <p><b>Examples</b>:</p>
<p>Using <code>mount</code> to mount a file system:</p>
<ul><pre> <ul><pre>
nsh> ls -l /dev nsh> ls -l /dev
/dev: /dev:
@ -1491,6 +1496,13 @@ nsh> cat /mnt/fs/testdir/example.txt
This is a test This is a test
nsh> nsh>
</pre></ul> </pre></ul>
<p>Using <code>mount</code> to enumerate mounts:</p>
<ul><pre>
nsh> mount
/etc type romfs
/mnt/fs type vfat
/tmp type vfat
</pre></ul>
<table width ="100%"> <table width ="100%">
<tr bgcolor="#e4e4e4"> <tr bgcolor="#e4e4e4">