fix watchdog pci addr

Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
This commit is contained in:
Derumier Alexandre 2011-10-03 14:53:10 +02:00 committed by Dietmar Maurer
parent b78ebef7e7
commit 0a40e8eab5

View File

@ -2104,7 +2104,9 @@ sub config_to_command {
if ($conf->{watchdog}) {
my $wdopts = parse_watchdog($conf->{watchdog});
push @$cmd, '-watchdog', $wdopts->{model} || 'i6300esb';
$pciaddr = print_pci_addr("watchdog");
my $watchdog = $wdopts->{model} || 'i6300esb';
push @$cmd, '-device', "$watchdog$pciaddr";
push @$cmd, '-watchdog-action', $wdopts->{action} if $wdopts->{action};
}
@ -2801,6 +2803,7 @@ sub print_pci_addr {
my $res = '';
my $devices = {
balloon0 => { bus => 0, addr => 3 },
watchdog => { bus => 0, addr => 4 },
virtio0 => { bus => 0, addr => 10 },
virtio1 => { bus => 0, addr => 11 },
virtio2 => { bus => 0, addr => 12 },