qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 3/3] cris: fix a segfault if pflash drive no


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] Re: [PATCH 3/3] cris: fix a segfault if pflash drive not found
Date: Thu, 13 Nov 2008 21:57:00 +0100
User-agent: Mutt/1.5.16 (2007-06-09)

On Thu, Nov 13, 2008 at 01:37:10PM -0600, Anthony Liguori wrote:
> Mark McLoughlin wrote:
>> drive_get_index() returns -1 if a drive isn't found; don't
>> use -1 to index drives_table.
>>   
>
> Looks fine to me.  Edgar?

Look OK, I'll apply it later tonight.

Thanks

>
> Regards,
>
> Anthony Liguori
>
>> Signed-off-by: Mark McLoughlin <address@hidden>
>> ---
>>  hw/etraxfs.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/etraxfs.c b/hw/etraxfs.c
>> index 4f93cd8..2f6e2ee 100644
>> --- a/hw/etraxfs.c
>> +++ b/hw/etraxfs.c
>> @@ -83,7 +83,7 @@ void bareetraxfs_init (ram_addr_t ram_size, int 
>> vga_ram_size,
>>      phys_flash = qemu_ram_alloc(FLASH_SIZE);
>>      i = drive_get_index(IF_PFLASH, 0, 0);
>>      pflash_cfi02_register(0x0, phys_flash,
>> -                          drives_table[i].bdrv, (64 * 1024),
>> +                          i != -1 ? drives_table[i].bdrv : NULL, (64 * 
>> 1024),
>>                            FLASH_SIZE >> 16,
>>                            1, 2, 0x0000, 0x0000, 0x0000, 0x0000,
>>                            0x555, 0x2aa);
>>   
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]