ptr = ws.data_start total_count = 0 bad_count = 0 while True: if total_count % 1000 == 0: active = ws.current_pos() while True: ptr += 0x20 if ptr >= 0x10000: ptr = ws.data_start if active < ptr - 0x10 or active >= ptr + 0x20: break result_1 = ws._read_block(ptr, retry=False) result_2 = ws._read_block(ptr, retry=False) if result_1 != result_2: logger.warning('read_block changing %06x', ptr) logger.warning(' %s', str(result_1)) logger.warning(' %s', str(result_2)) bad_count += 1 total_count += 1 print "\r %d/%d " % (bad_count, total_count), sys.stdout.flush() print '' return 0 if __name__ == "__main__": try: sys.exit(main()) except KeyboardInterrupt: pass
ptr = ws.data_start total_count = 0 bad_count = 0 while True: if total_count % 1000 == 0: active = ws.current_pos() while True: ptr += 0x20 if ptr >= 0x10000: ptr = ws.data_start if active < ptr - 0x10 or active >= ptr + 0x20: break result_1 = ws._read_block(ptr, retry=False) result_2 = ws._read_block(ptr, retry=False) if result_1 != result_2: logger.warning("read_block changing %06x", ptr) logger.warning(" %s", str(result_1)) logger.warning(" %s", str(result_2)) bad_count += 1 total_count += 1 print "\r %d/%d " % (bad_count, total_count), sys.stdout.flush() print "" return 0 if __name__ == "__main__": try: sys.exit(main()) except KeyboardInterrupt: pass