diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2008-11-16 14:55:34 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2008-11-16 14:55:34 +0000 |
commit | 52cefe8f9bb3e33de69b9cd043bc3660c895fb25 (patch) | |
tree | f4313ad1c0c6b07b1257bd5fef3313663f3e955f /nuttx/Documentation | |
parent | be912c851c90615115073a8a48874feeb58ea25a (diff) |
Add to losetup example
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1254 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/Documentation')
-rw-r--r-- | nuttx/Documentation/NuttShell.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html index 3db6178674..c5c5c921be 100644 --- a/nuttx/Documentation/NuttShell.html +++ b/nuttx/Documentation/NuttShell.html @@ -954,7 +954,10 @@ losetup [-o <offset>] [-r] <dev-path> <file-path> <p> <b>Synopsis</b>. Setup the loop device at <dev-path> to access the file at <file-path> as a block device. - Example: + In the following example a 256Kb file is created (<code>dd</code>) and <code>losetup</code> is + used to make the file accessible as a block device. + A FAT file system is created (<code>mkfatfs</code>) and mounted (<code>mount</code>). + Files can then be managed on the loop-mounted file. <ul><pre> nsh> dd if=/dev/zero of=/tmp/image bs=512 count=512 nsh> ls -l /tmp @@ -970,6 +973,13 @@ nsh> ls -l /mnt ls -l /mnt /mnt: drw-rw-rw- 0 example/ +nsh> echo "This is a test" >/mnt/example/atest.txt +nsh> ls -l /mnt/example +/mnt/example: + -rw-rw-rw- 16 ATEST.TXT +nsh> cat /mnt/example/atest.txt +This is a test +nsh> </pre></ul> </p> |