Changeset 4c53333 in mainline for tools/mkext2.py
- Timestamp:
- 2013-07-11T08:21:10Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64e63ce1
- Parents:
- 80445cf (diff), c8bb1633 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/mkext2.py
r80445cf r4c53333 39 39 import uuid 40 40 from imgutil import * 41 42 if sys.version >= '3': 43 xrange = range 41 44 42 45 GDE_SIZE = 32 … … 507 510 self.pos = align_up(self.pos, bytes) 508 511 512 def set_pos(self, pos): 513 "Set the current position" 514 515 self.pos = pos 516 509 517 def pack(self): 510 518 "Pack the inode structure and return the result" … … 525 533 data.flags = 0 526 534 blockconv = lambda x: 0 if x == None else x 527 data.direct_blocks = map(blockconv, self.direct)528 data.indirect_blocks = map(blockconv, self.indirect)535 data.direct_blocks = list(map(blockconv, self.direct)) 536 data.indirect_blocks = list(map(blockconv, self.indirect)) 529 537 data.version = 0 530 538 data.file_acl = 0 … … 562 570 head.inode_type = self.type 563 571 inode.write(head.pack()) 564 inode.write(self.name+'\0' )572 inode.write(self.name+'\0'.encode()) 565 573 inode.align_pos(4) 566 574 … … 581 589 if self.inode: 582 590 self.prev_entry.write(self.inode) 591 self.inode.set_pos(self.pos) 583 592 584 593 def add(self, entry):
Note:
See TracChangeset
for help on using the changeset viewer.