Changeset 3447 in MondoRescue for branches/3.2/MondoRescue/lib/MondoRescue/File.pm
- Timestamp:
- Aug 30, 2015, 2:33:49 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/MondoRescue/lib/MondoRescue/File.pm
r3262 r3447 26 26 27 27 our @ISA = qw(Exporter); 28 our @EXPORT = qw(mr_file_read_all_link mr_file_process_ldd mr_file_normalize );28 our @EXPORT = qw(mr_file_read_all_link mr_file_process_ldd mr_file_normalize mr_file_copy_and_erase_hash); 29 29 30 30 =pod … … 85 85 =over 4 86 86 87 =item B<mr_file_erase_hash> 88 89 This function erases all elements in the hash passed in parameter (such as the one created in mr_file_read_all_link) 90 Takes as param the hash to delete and returns a new fresh one 91 92 =cut 93 94 sub mr_file_copy_and_erase_hash { 95 96 my $files = shift; 97 my %h; 98 99 foreach my $i (keys %$files) { 100 $h{$i} = $files->{$i}; 101 delete $files->{$i}; 102 } 103 return(\%h); 104 } 105 106 =over 4 107 87 108 =item B<mr_file_read_all_link> 88 109 89 110 This function returns all the links found for a given file passed as parameter 90 111 Example: mr_file_read_all_link(/lib64) returns (/lib64,/usr/lib64) on a system having a link from /lib64 to /usr/lib64 91 The return value is a hash of all input files pointing to hash of links 112 The return value is a hash of all input files pointing to the hash of their links 113 That hash needs to be cleaned up after usage 92 114 93 115 =cut … … 96 118 97 119 # TODO: Can be parallelized 120 # use "our" to keep info between recursive calls 98 121 our $files; 122 99 123 100 124 foreach my $f (@_) {
Note:
See TracChangeset
for help on using the changeset viewer.