Date:2012-01-26 02:06:12 (12 years 2 months ago)
Author:Werner Almesberger
Commit:19462f4aa5369eddfa59b9022f13f12cfd5c5934
Message:m1/patches/rtems/mem-fixes.patch: fix mdump and medit shell commands

Files: m1/patches/rtems/mem-fixes.patch (1 diff)
m1/patches/rtems/series (1 diff)

Change Details

m1/patches/rtems/mem-fixes.patch
1This patch fixes the "mdump" and "medit" shell commands:
2
3- "mdump" got the length argument wrong and would only produce useful
4  output if it was omitted.
5
6- "medit" overran the argument list, choking on the NULL pointer
7  following the last argument.
8
9Note that "medit" still only does byte-sized accesses, which limits
10its usefulness on most systems.
11
12- Werner
13
14Index: rtems/cpukit/libmisc/shell/main_mdump.c
15===================================================================
16--- rtems.orig/cpukit/libmisc/shell/main_mdump.c 2012-01-25 21:48:05.000000000 -0300
17@@ -47,8 +47,8 @@
18   }
19
20   if (argc > 2) {
21- if ( rtems_string_to_int(argv[1], &max, NULL, 0) ) {
22- printf( "Length argument (%s) is not a number\n", argv[1] );
23+ if ( rtems_string_to_int(argv[2], &max, NULL, 0) ) {
24+ printf( "Length argument (%s) is not a number\n", argv[2] );
25       return -1;
26     }
27     if (max <= 0) {
28Index: rtems/cpukit/libmisc/shell/main_medit.c
29===================================================================
30--- rtems.orig/cpukit/libmisc/shell/main_medit.c 2012-01-25 21:48:30.000000000 -0300
31@@ -55,7 +55,7 @@
32    * Now edit the memory
33    */
34   n = 0;
35- for (i=2 ; i<=argc ; i++) {
36+ for (i=2 ; i<argc ; i++) {
37     unsigned char tmpc;
38
39     if ( rtems_string_to_unsigned_char(argv[i], &tmpc, NULL, 0) ) {
m1/patches/rtems/series
1717milkymist-usb-midi.patch
1818#milkymist-midi-opt.patch - applied 2011-12-06
1919fix-ftpd-root.patch
20mem-fixes.patch

Archive Download the corresponding diff file

Branches:
master



interactive