--- a/kvmtool Wed Aug 26 16:04:02 2009 +0200
+++ b/kvmtool Wed Aug 26 16:04:24 2009 +0200
@@ -92,15 +92,15 @@
}
if (defined($_ = <VM>)) {
- print $_;
+ print $_;
if (/char device redirected to (\S+)$/) {
- unlink(_monitor_link $kvm);
- symlink($1, _monitor_link $kvm);
- exit;
- }
+ unlink(_monitor_link $kvm);
+ symlink($1, _monitor_link $kvm);
+ exit;
+ }
- wait;
- die "$ME: didn't start: (exit ", $? >> 8, ")\n";
+ wait;
+ die "$ME: didn't start: (exit ", $? >> 8, ")\n";
}
@@ -109,7 +109,6 @@
sub cmd_monitor(@) {
my ($kvm, $cmd) = (shift, "@_");
pod2usage() if not defined $kvm;
-
my $monitor = _monitor_link $kvm;
my $pts = readlink $monitor
@@ -173,9 +172,9 @@
sub cmd_kill(@) {
my ($kvm) = @_;
pod2usage() if not defined $kvm;
- my $config = config->load_running_config(_running_config_file $kvm);
+ my $config = config->load_running_config(_running_config_file $kvm);
my $pidfile = $config->get("-pidfile");
- my $pid = slurp $pidfile, { chomp => 1 };
+ my $pid = slurp $pidfile, { chomp => 1 };
kill $KILL => $pid;
waitpid($pid, 0);
@@ -183,7 +182,6 @@
}
-
{
package config;
@@ -222,10 +220,12 @@
sub save_user_config {
my ($self, $file) = @_;
my $fh = new IO::File ">$file" or die "$file: $!\n";
- $fh->print(join "\n",
- "# kvm configuration file",
- "# imported kvm config, you *may* edit this file",
- @{ $data{$self}{config} });
+ $fh->print(
+ join "\n",
+ "# kvm configuration file",
+ "# imported kvm config, you *may* edit this file",
+ @{ $data{$self}{config} }
+ );
}
sub load_running_config {