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

Aaron Lauterer a.lauterer at proxmox.com
Fri Aug 6 15:46:42 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 5110190..8828aad 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -393,6 +393,10 @@ sub valid_drive_names {
             'efidisk0');
 }
 
+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