summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-10-18 17:21:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-30 16:53:24 +0200
commitefa379f2244ae5abaad1b6ce139920e7919130b1 (patch)
tree7f55d52990b7036dbdc7242afd65e78a6b18633e /commands
parent76281a16fbd01adaf823849a9e5ab30b3024ec5c (diff)
downloadbarebox-efa379f2244ae5abaad1b6ce139920e7919130b1.tar.gz
barebox-efa379f2244ae5abaad1b6ce139920e7919130b1.tar.xz
make parse_area_spec arguments loff_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/crc.c4
-rw-r--r--commands/digest.c4
-rw-r--r--commands/flash.c4
-rw-r--r--commands/mem.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/commands/crc.c b/commands/crc.c
index df229410f6..09af6aa3f9 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -84,8 +84,8 @@ out:
static int do_crc(int argc, char *argv[])
{
- ulong start = 0, size = ~0, total = 0;
- ulong crc = 0, vcrc = 0;
+ loff_t start = 0, size = ~0;
+ ulong crc = 0, vcrc = 0, total = 0;
char *filename = "/dev/mem";
#ifdef CONFIG_CMD_CRC_CMP
char *vfilename = NULL;
diff --git a/commands/digest.c b/commands/digest.c
index 84329144c7..07cbec9907 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -51,7 +51,7 @@ static int do_digest(char *algorithm, int argc, char *argv[])
argv++;
while (*argv) {
char *filename = "/dev/mem";
- ulong start = 0, size = ~0;
+ loff_t start = 0, size = ~0;
/* arguments are either file, file+area or area */
if (parse_area_spec(*argv, &start, &size)) {
@@ -66,7 +66,7 @@ static int do_digest(char *algorithm, int argc, char *argv[])
for (i = 0; i < d->length; i++)
printf("%02x", hash[i]);
- printf(" %s\t0x%08lx ... 0x%08lx\n", filename, start, start + size);
+ printf(" %s\t0x%08llx ... 0x%08llx\n", filename, start, start + size);
argv++;
}
diff --git a/commands/flash.c b/commands/flash.c
index 1fcb1cff00..d71349a192 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -41,7 +41,7 @@ static int do_flerase(int argc, char *argv[])
int fd;
char *filename = NULL;
struct stat s;
- unsigned long start = 0, size = ~0;
+ loff_t start = 0, size = ~0;
int ret = 0;
if (argc == 1)
@@ -109,7 +109,7 @@ static int do_protect(int argc, char *argv[])
char *filename = NULL;
struct stat s;
int prot = 1;
- unsigned long start = 0, size = ~0;
+ loff_t start = 0, size = ~0;
int ret = 0, err;
if (argc == 1)
diff --git a/commands/mem.c b/commands/mem.c
index 649d5bf451..0719700b68 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -163,7 +163,7 @@ static int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
static int do_mem_md(int argc, char *argv[])
{
- ulong start = 0, size = 0x100;
+ loff_t start = 0, size = 0x100;
int r, now;
int ret = 0;
int fd;
@@ -187,7 +187,7 @@ static int do_mem_md(int argc, char *argv[])
return 1;
do {
- now = min(size, RW_BUF_SIZE);
+ now = min(size, (loff_t)RW_BUF_SIZE);
r = read(fd, rw_buf, now);
if (r < 0) {
perror("read");