diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-04-21 14:30:03 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-04-22 09:11:50 -0500 |
commit | 56863d4f19c854acc5ebf5f5c1b590eb8164851a (patch) | |
tree | 0c8439545989520131b13aba178934ca8e7144c2 | |
parent | 888a6bc63c94ef34026399117ebf6a1fa0e7a29a (diff) |
qtest: Handle addresses and values for {in, out}[bwl] as unsigned
Handle the addresses and values for {in,out}[bwl] as unsigned (ie
with strtoul), as per the protocol specification comment. This fixes
a test failure in test_i440fx_defaults on 32-bit hosts where the test
tries to write 0x80000000 and qtest was instead writing 0x7fffffff.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1366551003-16649-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | qtest.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -271,8 +271,8 @@ static void qtest_process_command(CharDriverState *chr, gchar **words) uint32_t value; g_assert(words[1] && words[2]); - addr = strtol(words[1], NULL, 0); - value = strtol(words[2], NULL, 0); + addr = strtoul(words[1], NULL, 0); + value = strtoul(words[2], NULL, 0); if (words[0][3] == 'b') { cpu_outb(addr, value); @@ -290,7 +290,7 @@ static void qtest_process_command(CharDriverState *chr, gchar **words) uint32_t value = -1U; g_assert(words[1]); - addr = strtol(words[1], NULL, 0); + addr = strtoul(words[1], NULL, 0); if (words[0][2] == 'b') { value = cpu_inb(addr); |