From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id BECBD1FF0A7 for ; Mon, 17 Aug 2026 11:36:59 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id F2A7423B67; Mon, 17 Aug 2026 11:36:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=genua.de; s=202307; t=1786958962; bh=CJ12Odk3NMh45j8Ub2kWxcOHZKE6LvhV3vONHa993gE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=IYGyzrfCNf39uzAgag1V6mgM1xjr9Uh2Byj95OG/Qy7K1C3sU+j0djq+7DTlz8veo 4uukyiaNfZJxJYGnCxR8KQFzSuUMKhPXISBPzE3D37ExsCmLRfghunDAPEGlYii4Mk ouRfmAHTjGAV77rRTi8SUFWlt3aPh+3tQlA1YCtbBRw9gLf2FGFaKO7s6+9R4v+OPk Kpkg3BFRgjs8jIE3iwLbwIWlWjZjIdZbJTLrdsJ+mc98/GQ/lQoQyJXjTpp/Y+KCwI SH4bo2udQUkltQvxoLc00aFuTZZ4wcpAJUFPdDNg3cehj32PdM0/1ceBTkgqKgEHt2 k7zUOsmrfwVvw== Date: Mon, 17 Aug 2026 11:29:20 +0200 From: Christian Ludwig To: , <-b@genua.de>, Subject: [PATCH pve-storage 1/13] Add efi-firmware content type Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [192.168.217.185] X-ClientProxiedBy: kch1-mta07.win.genua.de (10.208.16.107) To kch1-mta07.win.genua.de (10.208.16.107) Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="----E7801513EEEFE8A05F16FCD4458E0D19" X-SPAM-LEVEL: Spam detection results: 0 DKIM_INVALID 0.1 DKIM or DK signature exists, but is not valid DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record UNPARSEABLE_RELAY 0.001 Informational: message has unparseable relay lines Message-ID-Hash: OOXDQOAZVKHM3GVB24PCGWGJUVI4VHWM X-Message-ID-Hash: OOXDQOAZVKHM3GVB24PCGWGJUVI4VHWM X-MailFrom: christian_ludwig@genua.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Content-Filtered-By: Mailman/MimeDel 3.3.10 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ------E7801513EEEFE8A05F16FCD4458E0D19 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline This is meant to hold custom OVMF code files. It is stored in the efi-firmware/ subdirectory of the storage path. There is no restriction on the file name. But stick with the safe character set, basically for safety reasons. Signed-off-by: Christian Ludwig --- src/PVE/Storage/Plugin.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 4f69f9b..f6ca140 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -372,7 +372,7 @@ PVE::JSONSchema::register_format('pve-storage-content', \&verify_content); sub verify_content { my ($ct, $noerr) = @_; - return $ct if $ct eq 'import'; + return $ct if $ct eq 'import' || $ct eq 'efi-firmware'; my $valid_content = valid_content_types('dir'); # dir includes all other types @@ -831,6 +831,8 @@ sub parse_volname { m!^import/(${PVE::Storage::SAFE_CHAR_WITH_WHITESPACE_CLASS_RE}+$PVE::Storage::IMPORT_EXT_RE_1)$! ) { return ('import', $1, undef, undef, undef, undef, $2); + } elsif ($volname =~ m!^efi-firmware/(${PVE::Storage::SAFE_CHAR_CLASS_RE}+)$!) { + return ('efi-firmware', $1, undef, undef, undef, undef, 'raw'); } die "unable to parse directory volume name '$volname'\n"; @@ -844,6 +846,7 @@ my $vtype_subdirs = { backup => 'dump', snippets => 'snippets', import => 'import', + 'efi-firmware' => 'efi-firmware', }; sub get_vtype_subdirs { @@ -1753,6 +1756,10 @@ my $get_subdir_files = sub { m!/(${PVE::Storage::SAFE_CHAR_CLASS_RE}+$PVE::Storage::IMPORT_EXT_RE_1)$!i; $info = { volid => "$sid:import/$1", format => "$2" }; + } elsif ($tt eq 'efi-firmware') { + next if $fn !~ m!/(${PVE::Storage::SAFE_CHAR_CLASS_RE}+)$!i; + + $info = { volid => "$sid:efi-firmware/$1", format => 'raw' }; } $info->{size} = $st->size; @@ -1789,6 +1796,8 @@ sub list_volumes { $data = $get_subdir_files->($storeid, $path, 'snippets'); } elsif ($type eq 'import') { $data = $get_subdir_files->($storeid, $path, 'import'); + } elsif ($type eq 'efi-firmware' && !defined($vmid)) { + $data = $get_subdir_files->($storeid, $path, 'efi-firmware'); } } -- 2.34.1 ------E7801513EEEFE8A05F16FCD4458E0D19--