public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>,
	Nicolas Frey <n.frey@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server 1/3] drive: add helper to detect VirtIO driver ISOs with known issues
Date: Mon, 21 Sep 2026 11:50:30 +0200	[thread overview]
Message-ID: <de2ff26c-8494-412f-ba7d-8d2966bb9ed8@proxmox.com> (raw)
In-Reply-To: <s8old91qyuc.fsf@toolbox>

Am 16.09.26 um 12:23 PM schrieb Maximiliano Sandoval:
> Nicolas Frey <n.frey@proxmox.com> writes:
>> +}
>> +
>> +# warn about every CD-ROM drive in $conf that contains a problematic VirtIO driver ISO
>> +sub warn_about_virtio_win_issues_in_config {
>> +    my ($conf) = @_;
>> +
>> +    return if !PVE::QemuServer::Helpers::windows_version($conf->{ostype});
>> +
>> +    for my $opt (valid_drive_names()) {
>> +        next if !defined($conf->{$opt});
>> +
>> +        my $drive = eval { parse_drive($opt, $conf->{$opt}) };
>> +        next if !$drive || !drive_is_cdrom($drive, 1);
>> +
>> +        warn_about_virtio_win_issues($opt, $drive->{file});
>> +    }
>> +
>> +    return;
> 
> cosmetic nit: This return might be redundant.
> 

IMHO, having such explicit 'return' statements is nice to see the
intention clearly. Perl will return the result of the last expression
implicitly, which can actually lead to accidents in practice:
https://lore.proxmox.com/pve-devel/20240226141020.296052-2-t.lamprecht@proxmox.com/

>> +}
>> +
>>  sub parse_drive_interface {
>>      my ($key) = @_;
> 





  reply	other threads:[~2026-09-21  9:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 14:32 [PATCH qemu-server 0/3] fix #7801: warn about problematic VirtIO ISOs Nicolas Frey
2026-09-15 14:32 ` [PATCH qemu-server 1/3] drive: add helper to detect VirtIO driver ISOs with known issues Nicolas Frey
2026-09-16 10:16   ` Maximiliano Sandoval
2026-09-16 10:23   ` Maximiliano Sandoval
2026-09-21  9:50     ` Fiona Ebner [this message]
2026-09-15 14:32 ` [PATCH qemu-server 2/3] partially fix #7801: api: warn about problematic VirtIO driver ISOs Nicolas Frey
2026-09-15 14:32 ` [PATCH qemu-server 3/3] partially fix #7801: vm start: warn about problematic VirtIO ISOs Nicolas Frey
2026-09-16 10:21 ` [PATCH qemu-server 0/3] fix #7801: " Maximiliano Sandoval
2026-09-16 10:26   ` Maximiliano Sandoval
2026-09-17 13:17 ` Jonas Theisen
2026-09-21 11:19 ` applied: " Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de2ff26c-8494-412f-ba7d-8d2966bb9ed8@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=m.sandoval@proxmox.com \
    --cc=n.frey@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal