edit: Move 'exit 0' to end of file.
[libguestfs.git] / tools / virt-edit
index 11e9023..7f474c9 100755 (executable)
@@ -194,7 +194,8 @@ if (@roots > 1) {
     die __x("{prog}: multiboot operating systems are not supported.\n",
             prog => basename ($0))
 }
-my %fses = $g->inspect_get_mountpoints ($roots[0]);
+my $root = $roots[0];
+my %fses = $g->inspect_get_mountpoints ($root);
 my @fses = sort { length $a <=> length $b } keys %fses;
 foreach (@fses) {
     $g->mount_options ("", $fses{$_}, $_);
@@ -268,8 +269,6 @@ if (defined $do_upload) {
 
 undef $g;
 
-exit 0;
-
 =head1 NON-INTERACTIVE EDITING
 
 C<virt-edit> normally calls out to C<$EDITOR> (or vi) so
@@ -369,6 +368,10 @@ do it like this:
 
  guestfish --rw -i -d domname edit /file1 : edit /file2
 
+=cut
+
+exit 0;
+
 =head1 ENVIRONMENT VARIABLES
 
 =over 4