From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] scripts: kwbimage: fix imagebuild on 32bit host system
Date: Sun, 26 Jan 2014 18:00:20 +0100 [thread overview]
Message-ID: <1390755620-19590-1-git-send-email-m.grzeschik@pengutronix.de> (raw)
We have to use strtoul to run the tool working on 32bit systems.
Otherwise it will generate signed numbers for strings representing
values with the 32nd bit set.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
scripts/kwbimage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kwbimage.c b/scripts/kwbimage.c
index 82cf21c..adfe0cd 100644
--- a/scripts/kwbimage.c
+++ b/scripts/kwbimage.c
@@ -1080,8 +1080,8 @@ static int image_create_config_parse_oneline(char *line,
}
el->type = IMAGE_CFG_DATA;
- el->regdata.raddr = strtol(value1, NULL, 16);
- el->regdata.rdata = strtol(value2, NULL, 16);
+ el->regdata.raddr = strtoul(value1, NULL, 16);
+ el->regdata.rdata = strtoul(value2, NULL, 16);
} else if (!strcmp(keyword, "PAYLOAD")) {
char *value = strtok_r(NULL, " ", &saveptr);
el->type = IMAGE_CFG_PAYLOAD;
--
1.8.5.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2014-01-26 17:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390755620-19590-1-git-send-email-m.grzeschik@pengutronix.de \
--to=m.grzeschik@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox