Changes in tools/mkext2.py [dba3e2c:cc1a727] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkext2.py

    rdba3e2c rcc1a727  
    3939import uuid
    4040from imgutil import *
    41 
    42 if sys.version >= '3':
    43         xrange = range
    4441
    4542GDE_SIZE = 32
     
    510507                self.pos = align_up(self.pos, bytes)
    511508       
    512         def set_pos(self, pos):
    513                 "Set the current position"
    514                
    515                 self.pos = pos
    516        
    517509        def pack(self):
    518510                "Pack the inode structure and return the result"
     
    533525                data.flags = 0
    534526                blockconv = lambda x: 0 if x == None else x
    535                 data.direct_blocks = list(map(blockconv, self.direct))
    536                 data.indirect_blocks = list(map(blockconv, self.indirect))
     527                data.direct_blocks = map(blockconv, self.direct)
     528                data.indirect_blocks = map(blockconv, self.indirect)
    537529                data.version = 0
    538530                data.file_acl = 0
     
    570562                head.inode_type = self.type
    571563                inode.write(head.pack())
    572                 inode.write(self.name+'\0'.encode())
     564                inode.write(self.name+'\0')
    573565                inode.align_pos(4)
    574566
     
    589581                        if self.inode:
    590582                                self.prev_entry.write(self.inode)
    591                                 self.inode.set_pos(self.pos)
    592583       
    593584        def add(self, entry):
Note: See TracChangeset for help on using the changeset viewer.