summaryrefslogtreecommitdiffstats
path: root/perl-install/loopback.pm
Commit message (Expand)AuthorAgeFilesLines
* $hd is now unused, no need to pass itPascal Rigaux2005-02-011-1/+1
* - fs::format::part_raw() now takes $wait_message to allow displaying the prog...Pascal Rigaux2005-01-061-1/+1
* better english (writing style rather than spoken one)Thierry Vignaud2004-12-131-1/+1
* many functions in fsedit don't modify anything, they are simply accessors.Pascal Rigaux2004-08-031-3/+2
* - add field {fs_type} partially replacing {pt_type}Pascal Rigaux2004-07-271-1/+1
* - move format related functions out of fs.pm to new module fs/format.pmPascal Rigaux2004-07-231-1/+1
* perl now handle cleanly utf8 string in exceptions, no need to die \N("...")Pascal Rigaux2004-04-051-1/+1
* perl_checker adaptations + fixesPascal Rigaux2003-04-241-1/+1
* to workaround perl bug removing UTF8 flag when passing scalars to die's, passGuillaume Cottenceau2003-02-191-1/+1
* remove unused variables or rename them with an underscore (eg: $o becomes $_o)Pascal Rigaux2002-12-041-1/+1
* do not use "local *F"Pascal Rigaux2002-12-041-3/+2
* replace "_" with "N" and "__" with "N_"Pascal Rigaux2002-11-061-1/+1
* use mkdir_p instead of mkdirPascal Rigaux2002-08-281-2/+2
* (prepare_boot): use $::prefixPascal Rigaux2002-08-011-5/+4
* revert back to /initrdGuillaume Cottenceau2001-10-291-4/+4
* replace /initrd with /lib/initrdPascal Rigaux2001-10-241-4/+4
* (create): don't use seek to create big files otherwise you get hole andPascal Rigaux2001-09-191-2/+5
* use new mkdir_p, rm_rf and cp_af from MDK::CommonPascal Rigaux2001-09-161-6/+5
* a hell lot of cleanup/rewrite:Pascal Rigaux2001-08-171-16/+26
* move to MDK::Common, bool->to_boolPascal Rigaux2001-07-241-2/+3
* no_commentPascal Rigaux2000-09-141-1/+1
* no_commentPascal Rigaux2000-08-181-25/+0
* no_commentPascal Rigaux2000-08-041-12/+3
* no_commentPascal Rigaux2000-04-131-1/+0
* no_commentPascal Rigaux2000-04-121-10/+10
* no_commentPascal Rigaux2000-03-301-0/+19
* no_commentPascal Rigaux2000-03-261-0/+3
* no_commentPascal Rigaux2000-03-221-8/+23
* no_commentPascal Rigaux2000-03-201-21/+30
* no_commentPascal Rigaux2000-03-141-2/+27
* no_commentPascal Rigaux2000-03-111-5/+4
* no_commentPascal Rigaux2000-03-091-2/+0
* no_commentPascal Rigaux2000-03-081-0/+83
span> #- help with such more sectors (ie 64Mb). #- help zindozs again with 512Mb+ at least else partition is ignored. if ($resize_fat::isFAT32) { $size = max($size, 524*1024*1024 / $SECTORSIZE); } $size; } #- calculates the maximum size of a partition, in physical sectors sub max_size($) { my ($fs) = @_; my $max_cluster_count = min($fs->{nb_fat_entries} - 2, max_cluster_count($fs)); $max_cluster_count * divide($fs->{cluster_size}, $SECTORSIZE) + divide($fs->{cluster_offset}, $SECTORSIZE); } #- calculates used size in order to avoid modifying anything. sub used_size($) { my ($fs) = @_; my $used_cluster_count = max(last_used($fs), min_cluster_count($fs)); $used_cluster_count * divide($fs->{cluster_size}, $SECTORSIZE) + divide($fs->{cluster_offset}, $SECTORSIZE); } #- fills in fat_flag_map in c_rewritten. #- Each FAT entry is flagged as either FREE, FILE or DIRECTORY. sub flag_clusters { my ($fs) = @_; my ($cluster, $curr_dir_name, $entry, $type, $nb_dirs); my $f = sub { ($curr_dir_name, $entry) = @_; $cluster = resize_fat::dir_entry::get_cluster($entry); if (resize_fat::dir_entry::is_file($entry)) { $type = $FILE; $type |= $UNMOVEABLE if resize_fat::dir_entry::is_unmoveable($entry); } elsif (resize_fat::dir_entry::is_directory($entry)) { $type = $DIRECTORY; } else { return } my $nb = resize_fat::c_rewritten::checkFat($cluster, $type, "$curr_dir_name/$entry->{name}"); print "resize_fat:flag_clusters: check fat returned $nb of type $type for $curr_dir_name/$entry->{name}\n"; $nb_dirs += $nb if $type == $DIRECTORY; 0; }; #- this must call allocate_fat_flag that zeroes the buffer allocated. resize_fat::c_rewritten::allocate_fat_flag($fs->{nb_clusters} + 2); resize_fat::directory::traverse_all($fs, $f); $fs->{clusters}{count}{dirs} = $nb_dirs; }