freemyipod r217 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r216‎ | r217 | r218 >
Date:12:16, 9 October 2010
Author:theseven
Status:new
Tags:
Comment:
libembios: Fix writedevconsole monitor command
Modified paths:
  • /embios/trunk/tools/libembios.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/libembios.py
@@ -258,7 +258,7 @@
259259 identified with the specified bitmask
260260 """
261261 cin_maxsize = self.lib.dev.packetsizelimit["cin"] - self.lib.headersize
262 - resp = self.lib.monitorcommand(struct.pack("IIII", 13, cin_maxsize, 0, 0), "III%ds" % cin_maxsize, ("size", None, None))
 262+ resp = self.lib.monitorcommand(struct.pack("IIII", 13, bitmask, cin_maxsize, 0), "III%ds" % cin_maxsize, ("size", None, None))
263263 resp.data = resp.data[size:]
264264 resp.maxsize = cin_maxsize
265265 return resp
@@ -271,7 +271,7 @@
272272 size = len(data)
273273 while len(data) > 0:
274274 writesize = min(cin_maxsize, len(data))
275 - resp = self.lib.monitorcommand(struct.pack("IIII%ds" % writesize, 12, writesize, 0, 0, data[:writesize]), "III", (None, None, None))
 275+ resp = self.lib.monitorcommand(struct.pack("IIII%ds" % writesize, 12, bitmask, writesize, 0, data[:writesize]), "III", (None, None, None))
276276 data = data[writesize:]
277277 return size
278278