Changeset 4339f09 in mainline for tools/mkext2.py


Ignore:
Timestamp:
2013-06-28T07:46:31Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e52b4b5
Parents:
3de67b4c (diff), dba3e2c (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.
Message:

Mostly C style (obey clang suggestions)

Merge from lp:~vojtech-horky/helenos/misc.

Most changes driven by warnings/errors from clang, such as type
redefinitions (typedef struct …) or possibly uninitizalied
variables. Clang still emits some warnings but a lot less than
before :-). As a result, kernel can be built with clang/-Werror.

Also updated mkext2.py to work with Python 3 again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkext2.py

    r3de67b4c r4339f09  
    3939import uuid
    4040from imgutil import *
     41
     42if sys.version >= '3':
     43        xrange = range
    4144
    4245GDE_SIZE = 32
     
    530533                data.flags = 0
    531534                blockconv = lambda x: 0 if x == None else x
    532                 data.direct_blocks = map(blockconv, self.direct)
    533                 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))
    534537                data.version = 0
    535538                data.file_acl = 0
     
    567570                head.inode_type = self.type
    568571                inode.write(head.pack())
    569                 inode.write(self.name+'\0')
     572                inode.write(self.name+'\0'.encode())
    570573                inode.align_pos(4)
    571574
Note: See TracChangeset for help on using the changeset viewer.