From 52cefe8f9bb3e33de69b9cd043bc3660c895fb25 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 16 Nov 2008 14:55:34 +0000 Subject: [PATCH] Add to losetup example git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1254 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/Documentation/NuttShell.html | 12 +++++++++++- nuttx/examples/nsh/README.txt | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html index 3db617867..c5c5c921b 100644 --- a/nuttx/Documentation/NuttShell.html +++ b/nuttx/Documentation/NuttShell.html @@ -954,7 +954,10 @@ losetup [-o ] [-r] <dev-path> <file-path>

Synopsis. 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 (dd) and losetup is + used to make the file accessible as a block device. + A FAT file system is created (mkfatfs) and mounted (mount). + Files can then be managed on the loop-mounted file.

diff --git a/nuttx/examples/nsh/README.txt b/nuttx/examples/nsh/README.txt index 840fe73fd..8bdd14eb5 100644 --- a/nuttx/examples/nsh/README.txt +++ b/nuttx/examples/nsh/README.txt @@ -357,6 +357,13 @@ o losetup [-d ] | [[-o ] [-r] ] 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> o ls [-lRs]