]> git.proxmox.com Git - pve-qemu.git/blob - debian/parse-cpu-flags.pl
savevm-async: avoid segfault when aborting snapshot
[pve-qemu.git] / debian / parse-cpu-flags.pl
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 my @flags = ();
7 my $got_flags_section;
8
9 while (<STDIN>) {
10 if (/^\s*Recognized CPUID flags:/) {
11 $got_flags_section = 1;
12 next;
13 }
14 next if !$got_flags_section;
15
16 s/^\s+//;
17
18 push @flags, split(/\s+/);
19 }
20
21 die "no QEMU/KVM CPU flags detected from STDIN input" if scalar (@flags) <= 0;
22
23 print join("\n", @flags) or die "$!\n";