all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] ovmf: rename 'is_template' parameter to 'readonly' to match its effect
@ 2025-08-13  8:11 Fiona Ebner
  2025-08-13  8:20 ` [pve-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-08-13  8:11 UTC (permalink / raw)
  To: pve-devel

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer/OVMF.pm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/PVE/QemuServer/OVMF.pm b/src/PVE/QemuServer/OVMF.pm
index 72f5be0d..08134e30 100644
--- a/src/PVE/QemuServer/OVMF.pm
+++ b/src/PVE/QemuServer/OVMF.pm
@@ -79,7 +79,7 @@ my sub get_ovmf_files($$$$) {
 }
 
 my sub print_ovmf_drive_commandlines {
-    my ($conf, $storecfg, $vmid, $hw_info, $version_guard, $is_template) = @_;
+    my ($conf, $storecfg, $vmid, $hw_info, $version_guard, $readonly) = @_;
 
     my ($amd_sev_type, $arch, $q35) = $hw_info->@{qw(amd-sev-type arch q35)};
 
@@ -109,7 +109,7 @@ my sub print_ovmf_drive_commandlines {
 
         $var_drive_str .= ",size=" . (-s $ovmf_vars)
             if $format eq 'raw' && $version_guard->(4, 1, 2);
-        $var_drive_str .= ',readonly=on' if $is_template;
+        $var_drive_str .= ',readonly=on' if $readonly;
     } else {
         log_warn("no efidisk configured! Using temporary efivars disk.");
         my $path = "/tmp/$vmid-ovmf.fd";
@@ -145,7 +145,7 @@ sub create_efidisk($$$$$$$$) {
 }
 
 my sub generate_ovmf_blockdev {
-    my ($conf, $storecfg, $vmid, $hw_info, $is_template) = @_;
+    my ($conf, $storecfg, $vmid, $hw_info, $readonly) = @_;
 
     my ($amd_sev_type, $arch, $machine_version, $q35) =
         $hw_info->@{qw(amd-sev-type arch machine-version q35)};
@@ -187,7 +187,7 @@ my sub generate_ovmf_blockdev {
     $drive->{cache} = 'writeback' if !$drive->{cache};
 
     my $extra_blockdev_options = {};
-    $extra_blockdev_options->{'read-only'} = 1 if $is_template;
+    $extra_blockdev_options->{'read-only'} = 1 if $readonly;
 
     $extra_blockdev_options->{size} = -s $ovmf_vars if $format eq 'raw';
 
@@ -201,7 +201,7 @@ my sub generate_ovmf_blockdev {
 }
 
 sub print_ovmf_commandline {
-    my ($conf, $storecfg, $vmid, $hw_info, $version_guard, $is_template) = @_;
+    my ($conf, $storecfg, $vmid, $hw_info, $version_guard, $readonly) = @_;
 
     my $amd_sev_type = $hw_info->{'amd-sev-type'};
 
@@ -216,7 +216,7 @@ sub print_ovmf_commandline {
     } else {
         if ($version_guard->(10, 0, 0)) { # for the switch to -blockdev
             my ($code_blockdev, $vars_blockdev, $throttle_group) =
-                generate_ovmf_blockdev($conf, $storecfg, $vmid, $hw_info, $is_template);
+                generate_ovmf_blockdev($conf, $storecfg, $vmid, $hw_info, $readonly);
 
             push $cmd->@*, '-object', to_json($throttle_group, { canonical => 1 });
             push $cmd->@*, '-blockdev', to_json($code_blockdev, { canonical => 1 });
@@ -225,7 +225,7 @@ sub print_ovmf_commandline {
                 "pflash1=$vars_blockdev->{'node-name'}";
         } else {
             my ($code_drive_str, $var_drive_str) = print_ovmf_drive_commandlines(
-                $conf, $storecfg, $vmid, $hw_info, $version_guard, $is_template,
+                $conf, $storecfg, $vmid, $hw_info, $version_guard, $readonly,
             );
             push $cmd->@*, '-drive', $code_drive_str;
             push $cmd->@*, '-drive', $var_drive_str;
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] ovmf: rename 'is_template' parameter to 'readonly' to match its effect
  2025-08-13  8:11 [pve-devel] [PATCH qemu-server] ovmf: rename 'is_template' parameter to 'readonly' to match its effect Fiona Ebner
@ 2025-08-13  8:20 ` Fabian Grünbichler
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-08-13  8:20 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner


On Wed, 13 Aug 2025 10:11:14 +0200, Fiona Ebner wrote:
> 


Applied, thanks!

[1/1] ovmf: rename 'is_template' parameter to 'readonly' to match its effect
      commit: 554ff732980c5de0dcfcadec2434f1ffc36e1f8a

Best regards,
-- 
Fabian Grünbichler <f.gruenbichler@proxmox.com>


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-13  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-13  8:11 [pve-devel] [PATCH qemu-server] ovmf: rename 'is_template' parameter to 'readonly' to match its effect Fiona Ebner
2025-08-13  8:20 ` [pve-devel] applied: " Fabian Grünbichler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal