Fix typo
authorJamie Cameron <jcameron@webmin.com>
Thu, 18 Mar 2010 17:24:04 +0000 (10:24 -0700)
committerJamie Cameron <jcameron@webmin.com>
Thu, 18 Mar 2010 17:24:04 +0000 (10:24 -0700)
lvm/lvm-lib.pl

index 3219c7c..ea3707b 100755 (executable)
@@ -546,16 +546,16 @@ elsif ($_[1] eq "xfs") {
        # Resize the filesystem .. which must be mounted!
        local @stat = &device_status($_[0]->{'device'});
        local ($m, $mount);
-       if (!$stat[2]) {
-               foreach $m (&mount::list_mounts()) {
-                       if ($m->[1] eq $_[0]->{'device'}) {
-                               $mount = $m;
-                               }
+       foreach $m (&mount::list_mounts()) {
+               if ($m->[1] eq $_[0]->{'device'}) {
+                       $mount = $m;
                        }
+               }
+       if (!$stat[2]) {
                $mount || return "Mount not found";
                &mount::mount_dir(@$mount);
                }
-       local $cmd = "xfs_growfs ".quotemeta($mount->[0]);
+       local $cmd = "xfs_growfs ".quotemeta($stat[0] || $mount->[0]);
        local $out = &backquote_logged("$cmd 2>&1");
        local $q = $?;
        if (!$stat[2]) {