Re: [Qemu-devel] [PATCH] memory: fix return value on unassigned reads

2012-01-26 Thread Fabien Chouteau
On 26/01/2012 10:33, Avi Kivity wrote: > The memory API returns -1 on unassigned reads, different from the original > in exec.c, which returned zero. Isn't this return value platform specific? > This breaks grlib_uart; apparently some users depend on it. > > Fix by returning zero; however if rea

Re: [Qemu-devel] [PATCH] memory: fix return value on unassigned reads

2012-01-26 Thread Avi Kivity
On 01/26/2012 01:31 PM, Fabien Chouteau wrote: > On 26/01/2012 10:33, Avi Kivity wrote: > > The memory API returns -1 on unassigned reads, different from the original > > in exec.c, which returned zero. > > Isn't this return value platform specific? Maybe (and I think ~0 is the common one); the pa

[Qemu-devel] [PATCH] memory: fix return value on unassigned reads

2012-01-26 Thread Avi Kivity
The memory API returns -1 on unassigned reads, different from the original in exec.c, which returned zero. This breaks grlib_uart; apparently some users depend on it. Fix by returning zero; however if reading from the uart is legal, then it should be modified to accept reads. Signed-off-by: Avi