[pve-devel] [RFC qemu-server 4/7] Drive: add valid_drive_names_with_unused

Aaron Lauterer a.lauterer at proxmox.com
Tue Jun 1 18:10:22 CEST 2021


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/QemuServer/Drive.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 146a4ab..e6606b0 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -392,6 +392,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.20.1






More information about the pve-devel mailing list