aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-01-12 12:39:32 -0700
committerChris Larson <chris_larson@mentor.com>2011-01-12 12:39:41 -0700
commit13923ece08a27d2f708768646820dc1461d735ee (patch)
tree3a4597e6b8ecf3e4e0324f6bde7ca3b686ce6476
parent310773c9b0f9917a488bcd5e1a009150056556b7 (diff)
downloadopenembedded-13923ece08a27d2f708768646820dc1461d735ee.tar.gz
devmem2: fix patch
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--recipes/devmem2/devmem2.bb2
-rw-r--r--recipes/devmem2/devmem2/devmem2-fixups-2.patch15
2 files changed, 10 insertions, 7 deletions
diff --git a/recipes/devmem2/devmem2.bb b/recipes/devmem2/devmem2.bb
index 4f92586a88..e3c444bd21 100644
--- a/recipes/devmem2/devmem2.bb
+++ b/recipes/devmem2/devmem2.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Simple program to read/write from/to any location in memory."
LICENSE = "GPLv2"
-PR = "r5"
+PR = "r6"
SRC_URI = "http://www.lartmaker.nl/lartware/port/devmem2.c \
file://devmem2-fixups-2.patch"
diff --git a/recipes/devmem2/devmem2/devmem2-fixups-2.patch b/recipes/devmem2/devmem2/devmem2-fixups-2.patch
index 05dde4167f..92177346ce 100644
--- a/recipes/devmem2/devmem2/devmem2-fixups-2.patch
+++ b/recipes/devmem2/devmem2/devmem2-fixups-2.patch
@@ -1,5 +1,9 @@
---- devmem2/devmem2.c.orig 2006-08-31 17:21:45.000000000 -0600
-+++ devmem2/devmem2.c 2006-09-02 09:09:29.000000000 -0600
+---
+ devmem2.c | 145 ++++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 86 insertions(+), 59 deletions(-)
+
+--- devmem2-1.0-r5.orig/devmem2.c
++++ devmem2-1.0-r5/devmem2.c
@@ -20,7 +20,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -40,16 +44,15 @@
- exit(1);
- }
- target = strtoul(argv[1], 0, 0);
--
-- if(argc > 2)
-- access_type = tolower(argv[2][0]);
+ void *map_base, *virt_addr;
+ unsigned long read_result, write_val;
+ off_t target;
+ int access_type = 'w';
+ char fmt_str[128];
+ size_t data_size;
-+
+
+- if(argc > 2)
+- access_type = tolower(argv[2][0]);
+ if(argc < 2) {
+ fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+ "\taddress : memory address to act upon\n"