Subversion Repositories havirt

Rev

Rev 42 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42 Rev 46
Line 32... Line 32...
32
# v1.2.1 20240828 RWR
32
# v1.2.1 20240828 RWR
33
# removed forceScan from migrateAll and relying on calling scripts to do that.
33
# removed forceScan from migrateAll and relying on calling scripts to do that.
34
#
34
#
35
# v1.2.2 20250511 RWR
35
# v1.2.2 20250511 RWR
36
# added source node as a parameter for migrate. If source node is passed in, will not run readDB
36
# added source node as a parameter for migrate. If source node is passed in, will not run readDB
-
 
37
#
-
 
38
# v1.2.3 20260101 RWR
-
 
39
# modified executeAndWait to return 0 on timeout, 1 on success
-
 
40
# bugfix in diffArray to handle case where arr1 is smaller than arr2
37
 
41
 
38
package havirt;
42
package havirt;
39
 
43
 
40
use warnings;
44
use warnings;
41
use strict;  
45
use strict;  
Line 306... Line 310...
306
   @$arr1 = sort @$arr1;
310
   @$arr1 = sort @$arr1;
307
   @$arr2 = sort @$arr2;
311
   @$arr2 = sort @$arr2;
308
   my $i=0;
312
   my $i=0;
309
   my $j=0;
313
   my $j=0;
310
 
314
 
311
   while ( $i < @$arr1 ) {
315
   while ( $i < @$arr1 && $j < @$arr2) {
312
      if ( $arr1->[$i] eq $arr2->[$j] ) {
316
      if ( $arr1->[$i] eq $arr2->[$j] ) {
313
         $i++;
317
         $i++;
314
         $j++;
318
         $j++;
315
      } elsif ( $arr1->[$i] lt $arr2->[$j] ) {
319
      } elsif ( $arr1->[$i] lt $arr2->[$j] ) {
316
         push @result, $arr1->[$i];
320
         push @result, $arr1->[$i];