Changeset ab579fa in mainline for tools/mkfat.py


Ignore:
Timestamp:
2008-11-03T23:36:45Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c71a1f
Parents:
a6d97fb9
Message:

skip .svn also during calculation of filesystem size
use cluster as small as a sector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkfat.py

    ra6d97fb9 rab579fa  
    5656                canon = os.path.join(root, name)
    5757               
    58                 if (os.path.isfile(canon)):
     58                if (os.path.isfile(canon) and (not name in exclude_names)):
    5959                        size += align_up(os.path.getsize(canon), cluster_size)
    6060                        files += 1
    6161               
    62                 if (os.path.isdir(canon)):
     62                if (os.path.isdir(canon) and (not name in exclude_names)):
    6363                        size += subtree_size(canon, cluster_size, dirent_size)
    6464                        files += 1
     
    354354       
    355355        fat16_clusters = 4096
    356         min_cluster_size = 1024
    357356       
    358357        sector_size = 512
     
    366365        size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size
    367366        while (size / cluster_size < fat16_clusters):
    368                 if (cluster_size > min_cluster_size):
     367                if (cluster_size > sector_size):
    369368                        cluster_size /= 2
    370369                        size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size
Note: See TracChangeset for help on using the changeset viewer.