[pve-devel] [PATCH v3 qemu-server 4/9] Drive: add valid_drive_names_with_unused

Aaron Lauterer a.lauterer at proxmox.com
Thu Oct 21 13:30:25 CEST 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 ff18434..b8b414c 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -456,6 +456,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