summaryrefslogtreecommitdiff
path: root/nuttx/examples/nsh
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-15 21:06:41 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-15 21:06:41 +0000
commit7d4ea4e733447d080fcde4f95261ab8c8f4aa39d (patch)
treebe82903a00b892de8025bce335e50576da4e1c1a /nuttx/examples/nsh
parent394e955f6c1bad0e4d81cd3b1e284fc6d0fae56a (diff)
downloadpx4-nuttx-7d4ea4e733447d080fcde4f95261ab8c8f4aa39d.tar.gz
px4-nuttx-7d4ea4e733447d080fcde4f95261ab8c8f4aa39d.tar.bz2
px4-nuttx-7d4ea4e733447d080fcde4f95261ab8c8f4aa39d.zip
Prevent sign extension when dumping bytes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1247 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh')
-rw-r--r--nuttx/examples/nsh/nsh.h2
-rw-r--r--nuttx/examples/nsh/nsh_dbgcmds.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/examples/nsh/nsh.h b/nuttx/examples/nsh/nsh.h
index 32a0c934d..fe90777dc 100644
--- a/nuttx/examples/nsh/nsh.h
+++ b/nuttx/examples/nsh/nsh.h
@@ -325,7 +325,7 @@ extern void nsh_freefullpath(char *relpath);
/* Debug */
extern void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
- const char *buffer, ssize_t nbytes);
+ const ubyte *buffer, ssize_t nbytes);
/* Shell command handlers */
diff --git a/nuttx/examples/nsh/nsh_dbgcmds.c b/nuttx/examples/nsh/nsh_dbgcmds.c
index 8e8e12d1c..05f31e0e0 100644
--- a/nuttx/examples/nsh/nsh_dbgcmds.c
+++ b/nuttx/examples/nsh/nsh_dbgcmds.c
@@ -312,7 +312,7 @@ int cmd_mem(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
****************************************************************************/
void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
- const char *buffer, ssize_t nbytes)
+ const ubyte *buffer, ssize_t nbytes)
{
char line[128];
int ch;
@@ -371,7 +371,7 @@ int cmd_xd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return ERROR;
}
- nsh_dumpbuffer(vtbl, "Hex dump", addr, nbytes);
+ nsh_dumpbuffer(vtbl, "Hex dump", (ubyte*)addr, nbytes);
return OK;
}
#endif