Prevent sign extension when dumping bytes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1247 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
67d446be4e
commit
1889e9e787
@ -325,7 +325,7 @@ extern void nsh_freefullpath(char *relpath);
|
|||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
extern void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
|
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 */
|
/* Shell command handlers */
|
||||||
|
|
||||||
|
@ -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,
|
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];
|
char line[128];
|
||||||
int ch;
|
int ch;
|
||||||
@ -371,7 +371,7 @@ int cmd_xd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsh_dumpbuffer(vtbl, "Hex dump", addr, nbytes);
|
nsh_dumpbuffer(vtbl, "Hex dump", (ubyte*)addr, nbytes);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user