Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3540 → Rev 3541

/trunk/tools/mktmpfs.py
34,6 → 34,8
import os
import xstruct
 
exclude_names = set(['.svn'])
 
HEADER = """little:
char tag[5] /* 'TMPFS' */
"""
70,7 → 72,7
for name in os.listdir(root):
canon = os.path.join(root, name)
if (os.path.isfile(canon)):
if (os.path.isfile(canon) and (not name in exclude_names)):
size = os.path.getsize(canon)
dentry = xstruct.create(DENTRY_FILE % len(name))
89,7 → 91,7
rd += len(data)
inf.close()
if (os.path.isdir(canon)):
if (os.path.isdir(canon) and (not name in exclude_names)):
dentry = xstruct.create(DENTRY_DIRECTORY % len(name))
dentry.kind = TMPFS_DIRECTORY
dentry.fname_len = len(name)
/trunk/tools/mkfat.py
36,6 → 36,8
import xstruct
import array
 
exclude_names = set(['.svn'])
 
def align_up(size, alignment):
"Return size aligned up to alignment"
286,11 → 288,11
for name in os.listdir(root):
canon = os.path.join(root, name)
if (os.path.isfile(canon)):
if (os.path.isfile(canon) and (not name in exclude_names)):
rv = write_file(canon, outf, cluster_size, data_start, fat, reserved_clusters)
directory.append(create_dirent(name, False, rv[0], rv[1]))
if (os.path.isdir(canon)):
if (os.path.isdir(canon) and (not name in exclude_names)):
rv = recursion(False, canon, outf, cluster_size, root_start, data_start, fat, reserved_clusters, dirent_size, empty_cluster)
directory.append(create_dirent(name, True, rv[0], rv[1]))