# HG changeset patch # User Heiko Schlittermann # Date 1251295464 -7200 # Node ID c372a47ee5019ad4888225a19b9c25aea95d1abc # Parent 48ec3ee16cd8e429b4b1a61eff12ae081daa281a [tidy] diff -r 48ec3ee16cd8 -r c372a47ee501 kvmtool --- 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($_ = )) { - 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 {