freemyipod r139 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r138‎ | r139 | r140 >
Date:20:56, 14 August 2010
Author:benedikt93
Status:new
Tags:
Comment:
really add execfirmware
Modified paths:
  • /embios/trunk/tools/embios.py (modified) (history)
  • /embios/trunk/tools/libembios.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/embios.py
@@ -375,6 +375,9 @@
376376 if len(argv) != 3: usage()
377377 dev.execimage(int(argv[2], 16))
378378
 379+ elif argv[1] == "execfirmware":
 380+ if len(argv) != 3: usage()
 381+ dev.execfirmware(int(argv[2], 16))
379382
380383 elif argv[1] == "readrawbootflash":
381384 if len(argv) != 5: usage()
Index: embios/trunk/tools/libembios.py
@@ -770,7 +770,10 @@
771771 process_n = 0
772772 retval = []
773773 while ptr < len(processinfo):
774 - if struct.unpack("<I", processinfo[ptr:ptr + 4])[0] == 0: continue # THREAD_FREE
 774+ if struct.unpack("<I", processinfo[ptr + 68:ptr + 72])[0] == 0: # THREAD_FREE
 775+ ptr += 120
 776+ process_n += 1
 777+ continue
775778
776779 retval.append({})
777780