am ec5ffbab
: allow partition sizes in hex (when prefixed with 0x)
Merge commit 'ec5ffbabd3a3ba65bac934305f7ffcb7e15fb744' into gingerbread-plus-aosp * commit 'ec5ffbabd3a3ba65bac934305f7ffcb7e15fb744': allow partition sizes in hex (when prefixed with 0x)
This commit is contained in:
@@ -94,12 +94,12 @@ def LoadMaxSizes(info):
|
|||||||
pieces = line.split()
|
pieces = line.split()
|
||||||
if len(pieces) != 2: continue
|
if len(pieces) != 2: continue
|
||||||
image = pieces[0]
|
image = pieces[0]
|
||||||
size = int(pieces[1])
|
size = int(pieces[1], 0)
|
||||||
OPTIONS.max_image_size[image + ".img"] = size
|
OPTIONS.max_image_size[image + ".img"] = size
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
if e.errno == errno.ENOENT:
|
if e.errno == errno.ENOENT:
|
||||||
def copy(x, y):
|
def copy(x, y):
|
||||||
if x+y in info: OPTIONS.max_image_size[x+".img"] = int(info[x+y])
|
if x+y in info: OPTIONS.max_image_size[x+".img"] = int(info[x+y], 0)
|
||||||
copy("blocksize", "")
|
copy("blocksize", "")
|
||||||
copy("boot", "_size")
|
copy("boot", "_size")
|
||||||
copy("recovery", "_size")
|
copy("recovery", "_size")
|
||||||
|
Reference in New Issue
Block a user