all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Elias Huhsovitz <e.huhsovitz@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server v4 3/4] helpers: return integer values for parse_number_sets
Date: Tue, 17 Nov 2026 17:39:37 +0100	[thread overview]
Message-ID: <21f3d4c9-bd26-4b9b-b69d-ff4d52dba947@proxmox.com> (raw)
In-Reply-To: <20261111152027.260117-4-e.huhsovitz@proxmox.com>

Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>

On 11/11/26 4:21 PM, Elias Huhsovitz wrote:
> Currently the ranges returned by parse_number_sets are stored as
> strings. Historically this has not been a problem, since the ranges
> havent been used for calculation.
> 
> New callers of this function might expect an integer value, instead of
> string.
> 
> Convert the returned value to an integer.
> 
> Signed-off-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
> ---
>   src/PVE/QemuServer/Helpers.pm | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PVE/QemuServer/Helpers.pm b/src/PVE/QemuServer/Helpers.pm
> index ecd1944f..ed1b9799 100644
> --- a/src/PVE/QemuServer/Helpers.pm
> +++ b/src/PVE/QemuServer/Helpers.pm
> @@ -308,7 +308,11 @@ sub parse_number_sets {
>       foreach my $part (split(/;/, $set)) {
>           if ($part =~ /^\s*(\d+)(?:-(\d+))?\s*$/) {
>               die "invalid range: $part ($2 < $1)\n" if defined($2) && $2 < $1;
> -            push @$res, [$1, $2];
> +
> +            my $start = int($1);
> +            my $end = defined($2) ? int($2) : undef;
> +
> +            push @$res, [$start, $end];
>           } else {
>               die "invalid range: $part\n";
>           }





  reply	other threads:[~2026-11-17 16:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 15:20 [RFC proxmox-perl-rs/qemu-server/qemu-server-rs v4 0/4] vCPU binding for qemu guests Elias Huhsovitz
2026-11-11 15:20 ` [PATCH qemu-server-rs v4 1/4] cpu: add pve-qemu-server-cpu crate for vCPU binding Elias Huhsovitz
2026-11-17 16:28   ` Dominik Csapak
2026-11-19  9:16     ` Elias Huhsovitz
2026-11-19 10:06       ` Dominik Csapak
2026-11-17 17:20   ` Thomas Lamprecht
2026-11-18  7:47     ` Dominik Csapak
2026-11-18  8:32       ` Thomas Lamprecht
2026-11-18 10:14         ` Fiona Ebner
2026-11-18 11:17           ` Elias Huhsovitz
2026-11-18 11:44             ` Thomas Lamprecht
2026-11-18 13:05               ` Elias Huhsovitz
2026-11-11 15:20 ` [PATCH proxmox-perl-rs v4 2/4] pve: cpu: add binding for pve-qemu-server-cpu crate Elias Huhsovitz
2026-11-17 16:37   ` Dominik Csapak
2026-11-11 15:20 ` [PATCH qemu-server v4 3/4] helpers: return integer values for parse_number_sets Elias Huhsovitz
2026-11-17 16:39   ` Dominik Csapak [this message]
2026-11-11 15:20 ` [PATCH qemu-server v4 4/4] cpu: add cpu binding Elias Huhsovitz
2026-11-17 16:36   ` Dominik Csapak
2026-11-19  9:35     ` Elias Huhsovitz
2026-11-19 10:07       ` Dominik Csapak
2026-11-19 13:16         ` Elias Huhsovitz
2026-11-19 17:08           ` Dominik Csapak

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=21f3d4c9-bd26-4b9b-b69d-ff4d52dba947@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=e.huhsovitz@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 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