freemyipod r769 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r768‎ | r769 | r770 >
Date:20:20, 2 September 2011
Author:user890104
Status:new
Tags:
Comment:
libemcore: fix a copy/paste bug
Modified paths:
  • /emcore/trunk/tools/libemcore.py (modified) (history)

Diff [purge]

Index: emcore/trunk/tools/libemcore.py
@@ -732,7 +732,7 @@
733733 def file_truncate(self, fd, length):
734734 """ Truncates a file referenced by a handle to a specified length """
735735 self.logger.debug("Truncating file with handle 0x%X to 0x%X bytes\n" % (fd, length))
736 - result = self.lib.monitorcommand(struct.pack("<IIII", 35, fd, offset, 0), "III", ("rc", None, None))
 736+ result = self.lib.monitorcommand(struct.pack("<IIII", 35, fd, length, 0), "III", ("rc", None, None))
737737 if result.rc > 0x80000000:
738738 raise DeviceError("file_truncate(fd=%d, length=0x%08X) failed with RC=0x%08X, errno=%d" % (fd, length, result.rc, self.errno()))
739739 self.logger.debug("File truncate result: 0x%X\n" % (result.rc))