pve-qemu-qoup/debian/parse-machines.pl
Stefan Reiter a6ede89808 add static supported machines file
Same rationale as the CPU flags file, avoids calling QEMU binary just to
query machine types.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-03-05 15:20:14 +01:00

22 lines
393 B
Perl
Executable File

#!/usr/bin/perl
use warnings;
use strict;
my @machines = ();
while (<STDIN>) {
if (/^\s*Supported machines are:/) {
next;
}
s/^\s+//;
my @machine = split(/\s+/);
next if $machine[0] !~ m/^pc-(i440fx|q35)/;
push @machines, $machine[0];
}
die "no QEMU machine types detected from STDIN input" if scalar (@machines) <= 0;
print join("\n", @machines) or die "$!\n";