WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] hvmloader: Fix 22383:cba667fb80cf iterati

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Nov 2010 13:35:24 -0800
Delivery-date: Wed, 10 Nov 2010 13:35:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1289398523 0
# Node ID c19e3371f31b2b039f38026a225be266df151316
# Parent  cba667fb80cfdadb8fb9da8b4224e116a12ec1b4
hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255

We need to declare devfn as wider than 8 bits for a loop 0<devfn<256
to terminate.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
 tools/firmware/hvmloader/hvmloader.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -r cba667fb80cf -r c19e3371f31b tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Wed Nov 10 13:58:16 2010 +0000
+++ b/tools/firmware/hvmloader/hvmloader.c      Wed Nov 10 14:15:23 2010 +0000
@@ -470,8 +470,7 @@ static int scan_option_rom(
  */
 static int scan_etherboot_nic(uint32_t copy_rom_dest)
 {
-    uint8_t devfn;
-    uint16_t class, vendor_id, device_id;
+    uint16_t class, vendor_id, device_id, devfn;
     int rom_size = 0;
 
     for ( devfn = 0; (devfn < 256) && !rom_size; devfn++ )
@@ -498,8 +497,7 @@ static int pci_load_option_roms(uint32_t
 static int pci_load_option_roms(uint32_t rom_base_addr)
 {
     uint32_t option_rom_addr, rom_phys_addr = rom_base_addr;
-    uint16_t vendor_id, device_id;
-    uint8_t devfn, class;
+    uint16_t vendor_id, device_id, devfn, class;
 
     for ( devfn = 0; devfn < 256; devfn++ )
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255, Xen patchbot-unstable <=