Commit 72fb7daa9ab6d3b55ca0dec126a2cd9e2bde7a8c
1 parent
dc1c0b74
Fix a typo in cpu_physical_memory_rw()
(Samuel Thibault) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4272 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
6 deletions
exec.c
... | ... | @@ -2544,20 +2544,20 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, |
2544 | 2544 | if (!(flags & PAGE_WRITE)) |
2545 | 2545 | return; |
2546 | 2546 | /* XXX: this code should not depend on lock_user */ |
2547 | - if (!(p = lock_user(VERIFY_WRITE, addr, len, 0))) | |
2547 | + if (!(p = lock_user(VERIFY_WRITE, addr, l, 0))) | |
2548 | 2548 | /* FIXME - should this return an error rather than just fail? */ |
2549 | 2549 | return; |
2550 | - memcpy(p, buf, len); | |
2551 | - unlock_user(p, addr, len); | |
2550 | + memcpy(p, buf, l); | |
2551 | + unlock_user(p, addr, l); | |
2552 | 2552 | } else { |
2553 | 2553 | if (!(flags & PAGE_READ)) |
2554 | 2554 | return; |
2555 | 2555 | /* XXX: this code should not depend on lock_user */ |
2556 | - if (!(p = lock_user(VERIFY_READ, addr, len, 1))) | |
2556 | + if (!(p = lock_user(VERIFY_READ, addr, l, 1))) | |
2557 | 2557 | /* FIXME - should this return an error rather than just fail? */ |
2558 | 2558 | return; |
2559 | - memcpy(buf, p, len); | |
2560 | - unlock_user(p, addr, 0); | |
2559 | + memcpy(buf, p, l); | |
2560 | + unlock_user(p, addr, l); | |
2561 | 2561 | } |
2562 | 2562 | len -= l; |
2563 | 2563 | buf += l; | ... | ... |