[pve-devel] [PATCH] add romfile option to hostpci

Alexandre DERUMIER aderumier at odiso.com
Mon Jan 9 13:59:19 CET 2017


Do you think it could be better to force the path to something like:

/usr/share/kvm/

?

(and tell the user to put his rom in this path)

currently, this can be any path


----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 9 Janvier 2017 13:41:02
Objet: Re: [pve-devel] [PATCH] add romfile option to hostpci

Please can we have a more elaborate description, i.e. is that 
a relative or absolute path? 

Also, the regex should exclude some special characters like our delimiter (',')? 

> + romfile => { 
> + type => 'string', 
> + pattern => '\S+', 
> + format_description => 'string', 
> + description => "Custom romfile.", 
> + optional => 1, 
> + }, 
> pcie => { 
> type => 'boolean', 
> description => "Choose the PCI-express bus (needs the 'q35' machine 
> model).", 
> @@ -2908,6 +2915,8 @@ sub config_to_command { 
> } 
> 
> my $rombar = defined($d->{rombar}) && !$d->{rombar} ? ',rombar=0' : ''; 
> + my $romfile = $d->{romfile} if $d->{romfile}; 
> + 
> my $xvga = ''; 
> if ($d->{'x-vga'}) { 
> $xvga = ',x-vga=on'; 
> @@ -2934,6 +2943,7 @@ sub config_to_command { 
> if($j == 0){ 
> $devicestr .= "$rombar$xvga"; 
> $devicestr .= ",multifunction=on" if $multifunction; 
> + $devicestr .= ",romfile=$romfile" if $romfile; 
> } 
> 
> push @$devices, '-device', $devicestr; 
> -- 
> 2.1.4 
> 
> _______________________________________________ 
> pve-devel mailing list 
> pve-devel at pve.proxmox.com 
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 




More information about the pve-devel mailing list