summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-04-24 07:02:32 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-04-24 07:02:32 -0600
commit3a69874e3fc195aa7a0986801efb2d9f28966b90 (patch)
treee9a7166633af7be3067a288d28ccd1ce0a34acd2
parent317d6cd44444c513e8f3501bf2d88855a5d91449 (diff)
downloadnuttx-3a69874e3fc195aa7a0986801efb2d9f28966b90.tar.gz
nuttx-3a69874e3fc195aa7a0986801efb2d9f28966b90.tar.bz2
nuttx-3a69874e3fc195aa7a0986801efb2d9f28966b90.zip
Fix test of range of skip= argument in NSH dd command. From Ken Petit
-rw-r--r--apps/ChangeLog.txt3
-rw-r--r--apps/nshlib/nsh_ddcmd.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index e54f04075..7cbdee3b3 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -529,3 +529,6 @@
* apps/examples/ostest: In the non-cancelable thread test, we need
to give the thread an opportunity to run and to set the non-
cancelable state.
+ * apps/nshlib/nsh_ddcmd.c: Correct the test of the skip input
+ parameter. Was limiting the range to <= count. From Ken
+ Petit (2014-4-24).
diff --git a/apps/nshlib/nsh_ddcmd.c b/apps/nshlib/nsh_ddcmd.c
index e6ef2523c..83e5441b7 100644
--- a/apps/nshlib/nsh_ddcmd.c
+++ b/apps/nshlib/nsh_ddcmd.c
@@ -545,12 +545,6 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
}
#endif
- if (dd.skip > dd.nsectors)
- {
- nsh_output(vtbl, g_fmtarginvalid, g_dd);
- goto errout_with_paths;
- }
-
/* Allocate the I/O buffer */
dd.buffer = malloc(dd.sectsize);