Add losetup to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1243 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
5c2fbf08a5
commit
cb42609f95
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>NuttX</title>
|
||||
<title>NuttShell</title>
|
||||
</head>
|
||||
<body background="backgd.gif">
|
||||
<hr><hr>
|
||||
@ -149,127 +149,133 @@
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdls">2.12 List Directory Contents (ls)</a>
|
||||
<a href="#cmdlosetup">2.12 Setup/teardown the Loop Device (losetup)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmbhw">2.13 Access Memory (mb, mh, and mw)</a>
|
||||
<a href="#cmdls">2.13 List Directory Contents (ls)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmem">2.14 Show Memory Manager Status (mem)</a>
|
||||
<a href="#cmdmbhw">2.14 Access Memory (mb, mh, and mw)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdps">2.15 Show Current Tasks and Threads (ps)</a>
|
||||
<a href="#cmdmem">2.15 Show Memory Manager Status (mem)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmkdir">2.16 Create a Directory (mkdir)</a>
|
||||
<a href="#cmdps">2.16 Show Current Tasks and Threads (ps)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmkfatfs">2.17 Create a FAT Filesystem (mkfatfs)</a>
|
||||
<a href="#cmdmkdir">2.17 Create a Directory (mkdir)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmkfifo">2.18 Create a FIFO (mkfifo)</a>
|
||||
<a href="#cmdmkfatfs">2.18 Create a FAT Filesystem (mkfatfs)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmkrd">2.19 Create a RAMDISK (mkrd)</a>
|
||||
<a href="#cmdmkfifo">2.19 Create a FIFO (mkfifo)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdmount">2.20 Mount a File System (mount)</a>
|
||||
<a href="#cmdmkrd">2.20 Create a RAMDISK (mkrd)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdping">2.21 Check Network Peer (ping)</a>
|
||||
<a href="#cmdmount">2.21 Mount a File System (mount)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdput">2.22 Send File Via TFTP (put)</a>
|
||||
<a href="#cmdping">2.22 Check Network Peer (ping)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdpwd">2.23 Show Current Working Directory (pwd)</a>
|
||||
<a href="#cmdput">2.23 Send File Via TFTP (put)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdrm">2.24 Remove a File (rm)</a>
|
||||
<a href="#cmdpwd">2.24 Show Current Working Directory (pwd)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdrmdir">2.25 Remove a Directory (rmdir)</a>
|
||||
<a href="#cmdrm">2.25 Remove a File (rm)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdset">2.26 Set an Environment Variable (set)</a>
|
||||
<a href="#cmdrmdir">2.26 Remove a Directory (rmdir)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdsh">2.27 Execute an NSH Script (sh)</a>
|
||||
<a href="#cmdset">2.27 Set an Environment Variable (set)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdsleep">2.28 Wait for Seconds (sleep)</a>
|
||||
<a href="#cmdsh">2.28 Execute an NSH Script (sh)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdunmount">2.29 Unmount a File System (umount)</a>
|
||||
<a href="#cmdsleep">2.29 Wait for Seconds (sleep)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdunset">2.30 Unset an Environment Variable (unset)</a>
|
||||
<a href="#cmdunmount">2.30 Unmount a File System (umount)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdusleep">2.31 Wait for Microseconds (usleep)</a>
|
||||
<a href="#cmdunset">2.31 Unset an Environment Variable (unset)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdxd">2.32 Hexadecimal Dump (xd)</a>
|
||||
<a href="#cmdusleep">2.32 Wait for Microseconds (usleep)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdxd">2.33 Hexadecimal Dump (xd)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -936,7 +942,33 @@ eth0 HWaddr 00:18:11:80:10:06
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdls"><h2>2.12 List Directory Contents (ls)</h2></a>
|
||||
<a name="cmdlosetup"><h2>2.12 Setup/teardown the Loop Device (losetup)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a <p><b>Command Syntax 1:</b></p>
|
||||
<ul><pre>
|
||||
losetup [-o <offset>] [-r] <dev-path> <file-path>
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Synopsis</b>.
|
||||
Setup the loop device at <dev-path> to access the file at <file-path> as a block device:
|
||||
</p>
|
||||
|
||||
<a <p><b>Command Syntax 2:</b></p>
|
||||
<ul><pre>
|
||||
losetup d <dev-path>
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Synopsis</b>.
|
||||
Teardown the setup for the loop device at <dev-path>.
|
||||
</p>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdls"><h2>2.13 List Directory Contents (ls)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -973,7 +1005,7 @@ ls [-lRs] <dir-path>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmbhw"><h2>2.13 Access Memory (mb, mh, and mw)</h2></a>
|
||||
<a name="cmdmbhw"><h2>2.14 Access Memory (mb, mh, and mw)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1027,7 +1059,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmem"><h2>2.14 Show Memory Manager Status (mem)</h2></a>
|
||||
<a name="cmdmem"><h2>2.15 Show Memory Manager Status (mem)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1076,7 +1108,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdps"><h2>2.15 Show Current Tasks and Threads (ps)</h2></a>
|
||||
<a name="cmdps"><h2>2.16 Show Current Tasks and Threads (ps)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1102,7 +1134,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmkdir"><h2>2.16 Create a Directory (mkdir)</h2></a>
|
||||
<a name="cmdmkdir"><h2>2.17 Create a Directory (mkdir)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1137,7 +1169,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmkfatfs"><h2>2.17 Create a FAT Filesystem (mkfatfs)</h2></a>
|
||||
<a name="cmdmkfatfs"><h2>2.18 Create a FAT Filesystem (mkfatfs)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1157,7 +1189,7 @@ mkfatfs <path>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmkfifo"><h2>2.18 Create a FIFO (mkfifo)</h2></a>
|
||||
<a name="cmdmkfifo"><h2>2.19 Create a FIFO (mkfifo)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1195,7 +1227,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmkrd"><h2>2.19 Create a RAMDISK (mkrd)</h2></a>
|
||||
<a name="cmdmkrd"><h2>2.20 Create a RAMDISK (mkrd)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1246,7 +1278,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdmount"><h2>2.20 Mount a File System (mount)</h2></a>
|
||||
<a name="cmdmount"><h2>2.21 Mount a File System (mount)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1313,7 +1345,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdping"><h2>2.21 Check Network Peer (ping)</h2></a>
|
||||
<a name="cmdping"><h2>2.22 Check Network Peer (ping)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1346,7 +1378,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdput"><h2>2.22 Send File Via TFTP (put)</h2></a>
|
||||
<a name="cmdput"><h2>2.23 Send File Via TFTP (put)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1381,7 +1413,7 @@ put [-b|-n] [-f <remote-path>] -h <ip-address> <local-path>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdpwd"><h2>2.23 Show Current Working Directory (pwd)</h2></a>
|
||||
<a name="cmdpwd"><h2>2.24 Show Current Working Directory (pwd)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1411,7 +1443,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdrm"><h2>2.24 Remove a File (rm)</h2></a>
|
||||
<a name="cmdrm"><h2>2.25 Remove a File (rm)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1445,7 +1477,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdrmdir"><h2>2.25 Remove a Directory (rmdir)</h2></a>
|
||||
<a name="cmdrmdir"><h2>2.26 Remove a Directory (rmdir)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1480,7 +1512,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdset"><h2>2.26 Set an Environment Variable (set)</h2></a>
|
||||
<a name="cmdset"><h2>2.27 Set an Environment Variable (set)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1506,7 +1538,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdsh"><h2>2.27 Execute an NSH Script (sh)</h2></a>
|
||||
<a name="cmdsh"><h2>2.28 Execute an NSH Script (sh)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1524,7 +1556,7 @@ sh <script-path>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdsleep"><h2>2.28 Wait for Seconds (sleep)</h2></a>
|
||||
<a name="cmdsleep"><h2>2.29 Wait for Seconds (sleep)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1541,7 +1573,7 @@ sleep <sec>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdunmount"><h2>2.29 Unmount a File System (umount)</h2></a>
|
||||
<a name="cmdunmount"><h2>2.30 Unmount a File System (umount)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1571,7 +1603,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdunset"><h2>2.30 Unset an Environment Variable (unset)</h2></a>
|
||||
<a name="cmdunset"><h2>2.31 Unset an Environment Variable (unset)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1597,7 +1629,7 @@ nsh>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdusleep"><h2>2.31 Wait for Microseconds (usleep)</h2></a>
|
||||
<a name="cmdusleep"><h2>2.32 Wait for Microseconds (usleep)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1614,7 +1646,7 @@ usleep <usec>
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdxd"><h2>2.32 Hexadecimal dump (xd)</h2></a>
|
||||
<a name="cmdxd"><h2>2.33 Hexadecimal dump (xd)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1733,6 +1765,11 @@ nsh>
|
||||
<td><code>CONFIG_NET</code></td>
|
||||
<td><code>CONFIG_EXAMPLES_NSH_DISABLE_IFCONFIG</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>losetup</code></b></td>
|
||||
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> && <code>CONFIG_NFILE_DESCRIPTORS</code> > 0</td>
|
||||
<td><code>CONFIG_EXAMPLES_NSH_DISABLE_LOSETUP</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>ls</code></b></td>
|
||||
<td><code>CONFIG_NFILE_DESCRIPTORS</code> > 0</td>
|
||||
@ -2159,6 +2196,7 @@ nsh>
|
||||
<li><a href="#cmdhelp"><code>help</code></a></li>
|
||||
<li><a href="#conditional"><code>if-then[-else]-fi</code></a></li>
|
||||
<li><a href="#cmdifconfig"><code>ifconfig</code></a></li>
|
||||
<li><a href="#cmdlosetup"><code>losetup</code></a></li>
|
||||
<li><a href="#cmdls">ls</code></a></li>
|
||||
<li><a href="#cmdmbhw"><code>mb</code></a></li>
|
||||
<li><a href="#cmdmbhw"><code>mh</code></a></li>
|
||||
|
@ -1195,7 +1195,8 @@ nuttx-0.3.18 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
into very small memory footprints.
|
||||
* Added a block to character (BCH) driver. This is kind of the reverse of the loop
|
||||
device; it allows you access a block device like a character device.
|
||||
* NSH: Added 'dd' command
|
||||
* NSH: Added the 'dd' command
|
||||
* NSH: Added the 'losetup' command
|
||||
|
||||
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user