freemyipod r121 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r120‎ | r121 | r122 >
Date:13:52, 13 August 2010
Author:benedikt93
Status:new
Tags:
Comment:
another try to fix libembios.py...
Modified paths:
  • /embios/trunk/tools/libembios.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/libembios.py
@@ -772,37 +772,37 @@
773773
774774 retval[process_n]['regs'] = struct.unpack("<IIIIIIIIIIIIIIII", processinfo[ptr:ptr + 64])
775775 ptr += 16 * 0x4
776 - retval[process_n]['cpsr'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 776+ retval[process_n]['cpsr'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
777777 ptr += 1 * 0x4
778 - retval[process_n]['state'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 778+ retval[process_n]['state'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
779779 ptr += 1 * 0x4
780 - retval[process_n]['name_ptr'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 780+ retval[process_n]['name_ptr'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
781781 ptr += 1 * 0x4
782 - retval[process_n]['cputime_current'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 782+ retval[process_n]['cputime_current'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
783783 ptr += 1 * 0x4
784784 retval[process_n]['cputime_total'] = struct.unpack("<Q", processinfo[ptr:ptr + 8])[0]
785785 ptr += 1 * 0x8
786 - retval[process_n]['startusec'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 786+ retval[process_n]['startusec'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
787787 ptr += 1 * 0x4
788 - retval[process_n]['queue_next_ptr'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 788+ retval[process_n]['queue_next_ptr'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
789789 ptr += 1 * 0x4
790 - retval[process_n]['timeout'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 790+ retval[process_n]['timeout'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
791791 ptr += 1 * 0x4
792 - retval[process_n]['blocked_since'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 792+ retval[process_n]['blocked_since'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
793793 ptr += 1 * 0x4
794 - retval[process_n]['blocked_by_ptr'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 794+ retval[process_n]['blocked_by_ptr'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
795795 ptr += 1 * 0x4
796 - retval[process_n]['stack_ptr'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 796+ retval[process_n]['stack_ptr'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
797797 ptr += 1 * 0x4
798 - retval[process_n]['err_no'] = struct.unpack("<I", processinfo[ptr:ptr + 4])[0]
 798+ retval[process_n]['err_no'] = int(struct.unpack("<I", processinfo[ptr:ptr + 4])[0])
799799 ptr += 1 * 0x4
800 - retval[process_n]['block_type'] = struct.unpack("<B", processinfo[ptr:ptr + 1])[0]
 800+ retval[process_n]['block_type'] = int(struct.unpack("<B", processinfo[ptr:ptr + 1])[0])
801801 ptr += 1 * 0x1
802 - retval[process_n]['thread_type'] = struct.unpack("<B", processinfo[ptr:ptr + 1])[0]
 802+ retval[process_n]['thread_type'] = int(struct.unpack("<B", processinfo[ptr:ptr + 1])[0])
803803 ptr += 1 * 0x1
804 - retval[process_n]['priority'] = struct.unpack("<B", processinfo[ptr:ptr + 1])[0]
 804+ retval[process_n]['priority'] = int(struct.unpack("<B", processinfo[ptr:ptr + 1])[0])
805805 ptr += 1 * 0x1
806 - retval[process_n]['cpuload'] = struct.unpack("<B", processinfo[ptr:ptr + 1])[0]
 806+ retval[process_n]['cpuload'] = int(struct.unpack("<B", processinfo[ptr:ptr + 1])[0])
807807 ptr += 1 * 0x1
808808
809809 process_n += 1