all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>, pve-devel@lists.proxmox.com
Subject: [pve-devel] superseded: [PATCH qemu-server] create_disks: forbid adding of non-raw tpmstate0 volumes
Date: Thu, 12 Dec 2024 11:29:27 +0100 (CET)	[thread overview]
Message-ID: <1148024034.11255.1733999367617@webmail.proxmox.com> (raw)
In-Reply-To: <7358d949-bb45-4f45-ba78-9d84c0b8c11b@proxmox.com>

> Fiona Ebner <f.ebner@proxmox.com> hat am 12.12.2024 11:16 CET geschrieben:
>  
> Am 12.12.24 um 10:54 schrieb Fabian Grünbichler:
> > when creating new ones, we already force raw as format, but adding existing
> > volumes as tpmstate0 had no such checks.
> > 
> > Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
> > Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> > ---
> >  PVE/API2/Qemu.pm | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> > index c00f60d7..fd2d0747 100644
> > --- a/PVE/API2/Qemu.pm
> > +++ b/PVE/API2/Qemu.pm
> > @@ -589,6 +589,8 @@ my sub create_disks : prototype($$$$$$$$$$$) {
> >  		    ) {
> >  			die "$ds - cloud-init drive is already attached at '$ci_key'\n";
> >  		    }
> > +		} elsif ($ds eq 'tpmstate0' && $volume_format && $volume_format ne 'raw') {
> > +		    die "tpmstate0: volume format is '$volume_format', only 'raw' is supported!\n"
> 
> Nit: missing semicolon
> 
> checked_parse_volname() always returns a format (valid for QEMU even
> :)), so no need for checking whether it is set
>

thanks, sent a v2!


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

      reply	other threads:[~2024-12-12 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12  9:54 [pve-devel] " Fabian Grünbichler
2024-12-12 10:16 ` Fiona Ebner
2024-12-12 10:29   ` Fabian Grünbichler [this message]

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=1148024034.11255.1733999367617@webmail.proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=f.ebner@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