summaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_ddcmd.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-01-11 09:50:54 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-01-11 09:50:54 -0600
commita31974f5f25547a6f4e4aadf5056602905b72b87 (patch)
tree83a6b76c362cad736c00ef7829373bcdde242c2d /apps/nshlib/nsh_ddcmd.c
parent9a3db48a553a6d62d9954d6b20327e95505578cc (diff)
downloadnuttx-a31974f5f25547a6f4e4aadf5056602905b72b87.tar.gz
nuttx-a31974f5f25547a6f4e4aadf5056602905b72b87.tar.bz2
nuttx-a31974f5f25547a6f4e4aadf5056602905b72b87.zip
Back quoted NSH arguments now functional
Diffstat (limited to 'apps/nshlib/nsh_ddcmd.c')
-rw-r--r--apps/nshlib/nsh_ddcmd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/nshlib/nsh_ddcmd.c b/apps/nshlib/nsh_ddcmd.c
index 5db3e42c3..ce6b47a47 100644
--- a/apps/nshlib/nsh_ddcmd.c
+++ b/apps/nshlib/nsh_ddcmd.c
@@ -173,7 +173,6 @@ static void dd_outfcloseblk(struct dd_s *dd)
}
#endif
-
/****************************************************************************
* Name: dd_outfclosech
****************************************************************************/
@@ -325,7 +324,7 @@ static int dd_readch(struct dd_s *dd)
}
/****************************************************************************
- * Name: dd_infopen
+ * Name: dd_filetype
****************************************************************************/
#ifndef CONFIG_DISABLE_MOUNTPOINT
@@ -391,6 +390,7 @@ static inline int dd_infopen(const char *name, struct dd_s *dd)
dd->infread = dd_readblk;
dd->infclose = dd_infcloseblk;
}
+
return OK;
}
#else
@@ -403,6 +403,7 @@ static inline int dd_infopen(const char *name, struct dd_s *dd)
nsh_output(vtbl, g_fmtcmdfailed, g_dd, "open", NSH_ERRNO);
return ERROR;
}
+
return OK;
}
#endif
@@ -450,6 +451,7 @@ static inline int dd_outfopen(const char *name, struct dd_s *dd)
dd->outfwrite = dd_writech; /* Character oriented write */
dd->outfclose = dd_outfclosech;
}
+
return OK;
}
#else
@@ -461,6 +463,7 @@ static inline int dd_outfopen(const char *name, struct dd_s *dd)
nsh_output(dd->vtbl, g_fmtcmdfailed, g_dd, "open", NSH_ERRNO);
return ERROR;
}
+
return OK;
}
#endif
@@ -614,22 +617,27 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
dd.sector++;
}
}
+
ret = OK;
errout_with_outf:
DD_INCLOSE(&dd);
+
errout_with_inf:
DD_OUTCLOSE(&dd);
free(dd.buffer);
+
errout_with_paths:
if (infile)
{
free(infile);
}
+
if (outfile)
{
free(outfile);
}
+
return ret;
}