Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec5ffbab authored by Doug Zongker's avatar Doug Zongker
Browse files

allow partition sizes in hex (when prefixed with 0x)

Change-Id: I806879fd496304c449ff5315b0ef48fd766d6428
parent c77a9ad4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -94,12 +94,12 @@ def LoadMaxSizes(info):
      pieces = line.split()
      if len(pieces) != 2: continue
      image = pieces[0]
      size = int(pieces[1])
      size = int(pieces[1], 0)
      OPTIONS.max_image_size[image + ".img"] = size
  except IOError, e:
    if e.errno == errno.ENOENT:
      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("boot", "_size")
      copy("recovery", "_size")