aboutsummaryrefslogtreecommitdiff
path: root/package/devmem2/0001-be-coherent-in-type-usage.patch
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2015-02-03 14:52:07 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2015-02-03 14:52:56 +0100
commit298cd8eaa21a21eee85f9551a26ad294347b1d5a (patch)
tree249fa33b66f65e6daffdbfc8ca2e5399e8d89e61 /package/devmem2/0001-be-coherent-in-type-usage.patch
parentdd798a45c571063595c45278e28ed4f614f2cf32 (diff)
downloadbuildroot-298cd8eaa21a21eee85f9551a26ad294347b1d5a.tar.gz
buildroot-298cd8eaa21a21eee85f9551a26ad294347b1d5a.tar.bz2
package/*: rename patches according to the new policy
Autogenerated from rename-patch.py (http://patchwork.ozlabs.org/patch/403345) Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/devmem2/0001-be-coherent-in-type-usage.patch')
-rw-r--r--package/devmem2/0001-be-coherent-in-type-usage.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/package/devmem2/0001-be-coherent-in-type-usage.patch b/package/devmem2/0001-be-coherent-in-type-usage.patch
new file mode 100644
index 0000000000..1777387734
--- /dev/null
+++ b/package/devmem2/0001-be-coherent-in-type-usage.patch
@@ -0,0 +1,52 @@
+From 6570e7afe1eebd64022b871b9ebd9a76be267f57 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 29 Jun 2014 16:27:49 +0200
+Subject: [PATCH] Be coherent in type usage
+
+- no need to use off_t because it is read from strtoul()
+- print unsigned int type correctly
+
+When built with _FILE_OFFSET_BITS=64, off_t becomes an long long int
+and was printed as an unsigned int which lead to a garbled output.
+
+Signed-off-by: Colin Didier <colin.didier@devialet.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ devmem2.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/devmem2.c b/devmem2.c
+index 7732ecb..7aa5c79 100644
+--- a/devmem2.c
++++ b/devmem2.c
+@@ -58,8 +58,7 @@
+ int main(int argc, char **argv) {
+ int fd;
+ void *map_base, *virt_addr;
+- unsigned long read_result, writeval;
+- off_t target;
++ unsigned long target, read_result, writeval;
+ int access_type = 'w';
+
+ if(argc < 2) {
+@@ -101,7 +100,7 @@ int main(int argc, char **argv) {
+ fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+ exit(2);
+ }
+- printf("Value at address 0x%X (%p): 0x%X\n", target, virt_addr, read_result);
++ printf("Value at address 0x%lX (%p): 0x%X\n", target, virt_addr, read_result);
+ fflush(stdout);
+
+ if(argc > 3) {
+@@ -120,7 +119,7 @@ int main(int argc, char **argv) {
+ read_result = *((unsigned long *) virt_addr);
+ break;
+ }
+- printf("Written 0x%X; readback 0x%X\n", writeval, read_result);
++ printf("Written 0x%lX; readback 0x%X\n", writeval, read_result);
+ fflush(stdout);
+ }
+
+--
+2.0.0
+