[pve-devel] [PATCH v5 qemu-server 3/9] Drive: add valid_drive_names_with_unused

Aaron Lauterer a.lauterer at proxmox.com
Tue Nov 9 15:55:34 CET 2021


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
v1 -> v2: fixed spacing between - and 1

 PVE/QemuServer/Drive.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 97b82f9..0f9ceba 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -467,6 +467,10 @@ sub valid_drive_names {
             'tpmstate0');
 }
 
+sub valid_drive_names_with_unused {
+    return (valid_drive_names(), map {"unused$_"} (0 .. ($MAX_UNUSED_DISKS - 1)));
+}
+
 sub is_valid_drivename {
     my $dev = shift;
 
-- 
2.30.2






More information about the pve-devel mailing list